mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-30 05:00:51 +08:00
Merge pull request #3532 from woocommerce/PCP-4989-disabling-credit-and-debit-card-bcdc-payments-does-not-work-in-the-new-ui
Disable the card button if BCDC is disabled (4989)
This commit is contained in:
commit
638ea5e141
2 changed files with 2 additions and 2 deletions
|
@ -159,7 +159,7 @@ class DisabledFundingSources {
|
|||
return $disable_funding;
|
||||
}
|
||||
|
||||
if ( ! is_checkout() || $this->dcc_configuration->use_acdc() ) {
|
||||
if ( ! is_checkout() || $this->dcc_configuration->use_acdc() || ! $this->dcc_configuration->is_bcdc_enabled() ) {
|
||||
// Non-checkout pages, or ACDC capability: Don't load card button.
|
||||
$disable_funding[] = 'card';
|
||||
}
|
||||
|
|
|
@ -330,7 +330,7 @@ class CardPaymentsConfiguration {
|
|||
* @return bool
|
||||
*/
|
||||
public function is_bcdc_enabled() : bool {
|
||||
if ( 'MX' === $this->store_country ) {
|
||||
if ( 'MX' === $this->store_country || ! $this->use_acdc() ) {
|
||||
$bcdc_setting = get_option( 'woocommerce_ppcp-card-button-gateway_settings' );
|
||||
$enabled = $bcdc_setting['enabled'] ?? '';
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue