From 06a8e16a64d3370b4653cabb6e552aec7a01f7f1 Mon Sep 17 00:00:00 2001 From: Daniel Dudzic Date: Fri, 23 May 2025 19:55:24 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Only=20load=20BCDC=20button=20on?= =?UTF-8?q?=20Classic=20Checkout?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/ppcp-button/src/Helper/DisabledFundingSources.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/ppcp-button/src/Helper/DisabledFundingSources.php b/modules/ppcp-button/src/Helper/DisabledFundingSources.php index 72e336c02..824e44abf 100644 --- a/modules/ppcp-button/src/Helper/DisabledFundingSources.php +++ b/modules/ppcp-button/src/Helper/DisabledFundingSources.php @@ -13,6 +13,7 @@ use WooCommerce\PayPalCommerce\WcGateway\Exception\NotFoundException; use WooCommerce\PayPalCommerce\WcGateway\Settings\Settings; use WooCommerce\PayPalCommerce\WcSubscriptions\FreeTrialHandlerTrait; use WooCommerce\PayPalCommerce\WcGateway\Helper\CardPaymentsConfiguration; +use WooCommerce\PayPalCommerce\WcGateway\Helper\CartCheckoutDetector; /** * Class DisabledFundingSources @@ -154,7 +155,7 @@ class DisabledFundingSources { * @return array */ private function apply_context_rules( array $disable_funding ) : array { - if ( 'MX' === $this->merchant_country && $this->dcc_configuration->is_bcdc_enabled() && is_checkout() ) { + if ( 'MX' === $this->merchant_country && $this->dcc_configuration->is_bcdc_enabled() && CartCheckoutDetector::has_classic_checkout() && is_checkout() ) { return $disable_funding; }