Simplify the new UI check for the onboarding.js file

This commit is contained in:
Daniel Dudzic 2025-03-24 15:43:17 +01:00
parent 3042e3d6b8
commit 5a0adf8ac8
No known key found for this signature in database
GPG key ID: 31B40D33E3465483

View file

@ -48,13 +48,7 @@ class OnboardingModule implements ServiceModule, ExtendingModule, ExecutableModu
add_action( add_action(
'admin_enqueue_scripts', 'admin_enqueue_scripts',
function() use ( $c ) { function() use ( $c ) {
if ( if ( ! SettingsModule::should_use_the_old_ui() ) {
apply_filters(
// phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
'woocommerce.feature-flags.woocommerce_paypal_payments.settings_enabled',
getenv( 'PCP_SETTINGS_ENABLED' ) === '1'
) && ! SettingsModule::should_use_the_old_ui()
) {
return; return;
} }