Merge pull request #2278 from woocommerce/PCP-2830-paypal-button-on-block-checkout-page-is-displayed-even-express-checkout-is-removed-from-smart-button-location

Fix the Smart Buttons in Block Checkout not respecting the location setting (2830)
This commit is contained in:
Emili Castells 2024-05-31 12:38:02 +02:00 committed by GitHub
commit 44ef6e3249
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -568,7 +568,7 @@ if(cartHasSubscriptionProducts(config.scriptData)) {
features.push('subscriptions');
}
if (block_enabled) {
if (block_enabled && config.enabled) {
if ((config.addPlaceOrderMethod || config.usePlaceOrder) && !config.scriptData.continuation) {
let descriptionElement = <div dangerouslySetInnerHTML={{__html: config.description}}></div>;
if (config.placeOrderButtonDescription) {