mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
take new gateway into account when returning the SmartButtonAsset object
This commit is contained in:
parent
009592614c
commit
a0b4344578
1 changed files with 3 additions and 1 deletions
|
@ -48,7 +48,9 @@ return [
|
|||
return new DisabledSmartButton();
|
||||
}
|
||||
$settings = $container->get('wcgateway.settings');
|
||||
if (!$settings->has('enabled') || ! $settings->get('enabled')) {
|
||||
$paypalDisabled = !$settings->has('enabled') || ! $settings->get('enabled');
|
||||
$creditCardDisabled = !$settings->has('dcc_gateway_enabled') || ! $settings->get('dcc_gateway_enabled');
|
||||
if ($paypalDisabled && $creditCardDisabled) {
|
||||
return new DisabledSmartButton();
|
||||
}
|
||||
$payeeRepository = $container->get('api.repository.payee');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue