mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-31 06:52:50 +08:00
update logic on when to return the DisabledSmartButton object
This commit is contained in:
parent
d75c29c420
commit
a4aea53302
1 changed files with 1 additions and 2 deletions
|
@ -60,8 +60,7 @@ return array(
|
|||
}
|
||||
$settings = $container->get( 'wcgateway.settings' );
|
||||
$paypal_disabled = ! $settings->has( 'enabled' ) || ! $settings->get( 'enabled' );
|
||||
$credit_card_disabled = ! $settings->has( 'dcc_enabled' ) || ! $settings->get( 'dcc_enabled' );
|
||||
if ( $paypal_disabled && $credit_card_disabled ) {
|
||||
if ( $paypal_disabled ) {
|
||||
return new DisabledSmartButton();
|
||||
}
|
||||
$payee_repository = $container->get( 'api.repository.payee' );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue