only change Modules in run that are to early for translations and use plugins_loaded again

This commit is contained in:
Daniel Hüsken 2024-11-25 15:39:38 +01:00
parent 622913f384
commit 4dcabc5e67
No known key found for this signature in database
GPG key ID: 9F732DA37FA709E8
16 changed files with 353 additions and 290 deletions

View file

@ -71,12 +71,12 @@ class PayLaterBlockModule implements ServiceModule, ExtendingModule, ExecutableM
return true;
}
$settings = $c->get( 'wcgateway.settings' );
assert( $settings instanceof Settings );
add_action(
'init',
function () use ( $c, $settings ): void {
function () use ( $c ): void {
$settings = $c->get( 'wcgateway.settings' );
assert( $settings instanceof Settings );
$script_handle = 'ppcp-paylater-block';
wp_register_script(
$script_handle,