mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Unset the gateway only on checkout page
This commit is contained in:
parent
8a7a64cb7e
commit
b0ad59e92f
1 changed files with 1 additions and 1 deletions
|
@ -69,7 +69,7 @@ class DisableGateways {
|
|||
unset( $methods[ CreditCardGateway::ID ] );
|
||||
}
|
||||
|
||||
if ( $this->settings->has( 'button_enabled' ) && ! $this->settings->get( 'button_enabled' ) && ! $this->session_handler->order() ) {
|
||||
if ( $this->settings->has( 'button_enabled' ) && ! $this->settings->get( 'button_enabled' ) && ! $this->session_handler->order() && is_checkout() ) {
|
||||
unset( $methods[ PayPalGateway::ID ] );
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue