update logic on when to return the DisabledSmartButton object

This commit is contained in:
David Remer 2020-09-03 11:25:02 +03:00
parent d75c29c420
commit a4aea53302

View file

@ -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' );