mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Merge branch 'trunk' into PCP-892-combine-webhooks-status-page-into-new-connection-tab
This commit is contained in:
commit
2d4620d780
2 changed files with 16 additions and 15 deletions
|
@ -88,9 +88,12 @@ class DisableGateways {
|
|||
* @return bool
|
||||
*/
|
||||
private function disable_all_gateways() : bool {
|
||||
if ( ! $this->settings->has( 'enabled' ) || ! $this->settings->get( 'enabled' ) ) {
|
||||
return true;
|
||||
foreach ( WC()->payment_gateways->payment_gateways() as $gateway ) {
|
||||
if ( PayPalGateway::ID === $gateway->id && $gateway->enabled !== 'yes' ) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! $this->settings->has( 'merchant_email' ) || ! is_email( $this->settings->get( 'merchant_email' ) ) ) {
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue