Fix wrong condition to load file in post edit screen

This commit is contained in:
Emili Castells Guasch 2025-07-09 12:33:10 +02:00
parent 1da9766dcc
commit bbd8f9cf38
No known key found for this signature in database

View file

@ -501,9 +501,10 @@ class PayPalSubscriptionsModule implements ServiceModule, ExtendingModule, Execu
if ( ! is_string( $hook ) || wcs_is_manual_renewal_enabled() ) { if ( ! is_string( $hook ) || wcs_is_manual_renewal_enabled() ) {
return; return;
} }
$settings = $c->get( 'wcgateway.settings' ); $settings = $c->get( 'wcgateway.settings' );
$subscription_mode = $settings->has( 'subscriptions_mode' ) ? $settings->get( 'subscriptions_mode' ) : ''; $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; return;
} }