Merge pull request #2810 from woocommerce/PCP-3943-disable-the-old-onboarding-assets-when-the-new-settings-ui-is-enabled

Disable the old onboarding assets when the new settings UI is enabled (3943)
This commit is contained in:
Emili Castells 2024-11-20 11:51:29 +01:00 committed by GitHub
commit 4bb09bb5b1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -44,6 +44,12 @@ class OnboardingModule implements ServiceModule, ExtendingModule, ExecutableModu
*/
public function run( ContainerInterface $c ): bool {
if ( ! apply_filters(
// phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
'woocommerce.feature-flags.woocommerce_paypal_payments.settings_enabled',
getenv( 'PCP_SETTINGS_ENABLED' ) === '1'
) ) {
$asset_loader = $c->get( 'onboarding.assets' );
/**
* The OnboardingAssets.
@ -64,6 +70,7 @@ class OnboardingModule implements ServiceModule, ExtendingModule, ExecutableModu
'enqueue',
)
);
}
add_filter(
'woocommerce_form_field',