mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
disable dcc gateway dependingon onboarding
This commit is contained in:
parent
a0c419187a
commit
0d02c1f421
1 changed files with 7 additions and 0 deletions
|
@ -5,6 +5,7 @@ declare(strict_types=1);
|
|||
namespace Inpsyde\PayPalCommerce\WcGateway\Checkout;
|
||||
|
||||
use Inpsyde\PayPalCommerce\Session\SessionHandler;
|
||||
use Inpsyde\PayPalCommerce\WcGateway\Gateway\CreditCardGateway;
|
||||
use Inpsyde\PayPalCommerce\WcGateway\Gateway\PayPalGateway;
|
||||
use Psr\Container\ContainerInterface;
|
||||
|
||||
|
@ -32,9 +33,15 @@ class DisableGateways
|
|||
|| ! is_email($this->settings->get('merchant_email'))
|
||||
) {
|
||||
unset($methods[PayPalGateway::ID]);
|
||||
unset($methods[CreditCardGateway::ID]);
|
||||
return $methods;
|
||||
}
|
||||
|
||||
if (! $this->settings->has('client_id') || empty($this->settings->get('client_id'))) {
|
||||
unset($methods[CreditCardGateway::ID]);
|
||||
}
|
||||
|
||||
|
||||
if (! $this->needsToDisableGateways()) {
|
||||
return $methods;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue