mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
only change Modules in run that are to early for translations and use plugins_loaded again
This commit is contained in:
parent
622913f384
commit
4dcabc5e67
16 changed files with 353 additions and 290 deletions
|
@ -44,25 +44,21 @@ 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',
|
||||
)
|
||||
function() use ( $c ) {
|
||||
$asset_loader = $c->get( 'onboarding.assets' );
|
||||
assert( $asset_loader instanceof OnboardingAssets );
|
||||
|
||||
$asset_loader->register();
|
||||
add_action(
|
||||
'woocommerce_settings_checkout',
|
||||
array(
|
||||
$asset_loader,
|
||||
'enqueue',
|
||||
)
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
add_filter(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue