mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
add setting and manage availability of dcc gateway
This commit is contained in:
parent
f9e64abe14
commit
57a6f8b85c
7 changed files with 22 additions and 10 deletions
|
@ -60,7 +60,7 @@ return array(
|
|||
}
|
||||
$settings = $container->get( 'wcgateway.settings' );
|
||||
$paypal_disabled = ! $settings->has( 'enabled' ) || ! $settings->get( 'enabled' );
|
||||
$credit_card_disabled = ! $settings->has( 'dcc_gateway_enabled' ) || ! $settings->get( 'dcc_gateway_enabled' );
|
||||
$credit_card_disabled = ! $settings->has( 'dcc_enabled' ) || ! $settings->get( 'dcc_enabled' );
|
||||
if ( $paypal_disabled && $credit_card_disabled ) {
|
||||
return new DisabledSmartButton();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue