mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +08:00
Do not disable card funding source if card gateway enabled
This commit is contained in:
parent
c11635343d
commit
429260ca34
1 changed files with 4 additions and 1 deletions
|
@ -958,7 +958,10 @@ class SmartButton implements SmartButtonInterface {
|
|||
|
||||
$is_dcc_enabled = $this->settings->has( 'dcc_enabled' ) && $this->settings->get( 'dcc_enabled' );
|
||||
|
||||
if ( is_checkout() && $is_dcc_enabled ) {
|
||||
$available_gateways = WC()->payment_gateways->get_available_payment_gateways();
|
||||
$is_separate_card_enabled = isset( $available_gateways[ CardButtonGateway::ID ] );
|
||||
|
||||
if ( is_checkout() && ( $is_dcc_enabled || $is_separate_card_enabled ) ) {
|
||||
$key = array_search( 'card', $disable_funding, true );
|
||||
if ( false !== $key ) {
|
||||
unset( $disable_funding[ $key ] );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue