mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Disable the old onboarding assets when the new settings UI is enabled
This commit is contained in:
parent
d09d7f7b65
commit
bda83055f7
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 {
|
||||
|
||||
$asset_loader = $c->get( 'onboarding.assets' );
|
||||
/**
|
||||
* The OnboardingAssets.
|
||||
*
|
||||
* @var OnboardingAssets $asset_loader
|
||||
*/
|
||||
add_action(
|
||||
'admin_enqueue_scripts',
|
||||
array(
|
||||
$asset_loader,
|
||||
'register',
|
||||
)
|
||||
);
|
||||
add_action(
|
||||
'woocommerce_settings_checkout',
|
||||
array(
|
||||
$asset_loader,
|
||||
'enqueue',
|
||||
)
|
||||
);
|
||||
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.
|
||||
*
|
||||
* @var OnboardingAssets $asset_loader
|
||||
*/
|
||||
add_action(
|
||||
'admin_enqueue_scripts',
|
||||
array(
|
||||
$asset_loader,
|
||||
'register',
|
||||
)
|
||||
);
|
||||
add_action(
|
||||
'woocommerce_settings_checkout',
|
||||
array(
|
||||
$asset_loader,
|
||||
'enqueue',
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
add_filter(
|
||||
'woocommerce_form_field',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue