mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 09:08:09 +08:00
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:
commit
4bb09bb5b1
1 changed files with 27 additions and 20 deletions
|
@ -44,26 +44,33 @@ class OnboardingModule implements ServiceModule, ExtendingModule, ExecutableModu
|
||||||
*/
|
*/
|
||||||
public function run( ContainerInterface $c ): bool {
|
public function run( ContainerInterface $c ): bool {
|
||||||
|
|
||||||
$asset_loader = $c->get( 'onboarding.assets' );
|
if ( ! apply_filters(
|
||||||
/**
|
// phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
|
||||||
* The OnboardingAssets.
|
'woocommerce.feature-flags.woocommerce_paypal_payments.settings_enabled',
|
||||||
*
|
getenv( 'PCP_SETTINGS_ENABLED' ) === '1'
|
||||||
* @var OnboardingAssets $asset_loader
|
) ) {
|
||||||
*/
|
|
||||||
add_action(
|
$asset_loader = $c->get( 'onboarding.assets' );
|
||||||
'admin_enqueue_scripts',
|
/**
|
||||||
array(
|
* The OnboardingAssets.
|
||||||
$asset_loader,
|
*
|
||||||
'register',
|
* @var OnboardingAssets $asset_loader
|
||||||
)
|
*/
|
||||||
);
|
add_action(
|
||||||
add_action(
|
'admin_enqueue_scripts',
|
||||||
'woocommerce_settings_checkout',
|
array(
|
||||||
array(
|
$asset_loader,
|
||||||
$asset_loader,
|
'register',
|
||||||
'enqueue',
|
)
|
||||||
)
|
);
|
||||||
);
|
add_action(
|
||||||
|
'woocommerce_settings_checkout',
|
||||||
|
array(
|
||||||
|
$asset_loader,
|
||||||
|
'enqueue',
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
add_filter(
|
add_filter(
|
||||||
'woocommerce_form_field',
|
'woocommerce_form_field',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue