mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-30 05:00:51 +08:00
Fix wrong condition to load file in post edit screen
This commit is contained in:
parent
1da9766dcc
commit
bbd8f9cf38
1 changed files with 2 additions and 1 deletions
|
@ -501,9 +501,10 @@ class PayPalSubscriptionsModule implements ServiceModule, ExtendingModule, Execu
|
|||
if ( ! is_string( $hook ) || wcs_is_manual_renewal_enabled() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$settings = $c->get( 'wcgateway.settings' );
|
||||
$subscription_mode = $settings->has( 'subscriptions_mode' ) ? $settings->get( 'subscriptions_mode' ) : '';
|
||||
if ( $hook !== 'post.php' && $hook !== 'post-new.php' && $subscription_mode !== 'subscriptions_api' ) {
|
||||
if ( ! in_array( $hook, array( 'post.php', 'post-new.php' ), true ) || $subscription_mode !== 'subscriptions_api' ) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue