Check configuration later for not getting translation deprecated message

This commit is contained in:
Daniel Hüsken 2024-12-02 11:48:55 +01:00
parent 9276bab9f7
commit df6127e601
No known key found for this signature in database
GPG key ID: 9F732DA37FA709E8

View file

@ -135,20 +135,12 @@ class AxoBlockModule implements ServiceModule, ExtendingModule, ExecutableModule
}
);
// Enqueue the PayPal Insights script.
$dcc_configuration = $c->get( 'wcgateway.configuration.dcc' );
assert( $dcc_configuration instanceof DCCGatewayConfiguration );
$is_axo_enabled = $dcc_configuration->use_fastlane();
if ( $is_axo_enabled ) {
add_action(
'wp_enqueue_scripts',
function () use ( $c ) {
$this->enqueue_paypal_insights_script( $c );
}
);
}
add_action(
'wp_enqueue_scripts',
function () use ( $c ) {
$this->enqueue_paypal_insights_script( $c );
}
);
return true;
}
@ -195,6 +187,11 @@ class AxoBlockModule implements ServiceModule, ExtendingModule, ExecutableModule
return;
}
$dcc_configuration = $c->get( 'wcgateway.configuration.dcc' );
if ( ! $dcc_configuration->use_fastlane() ) {
return;
}
$module_url = $c->get( 'axoblock.url' );
$asset_version = $c->get( 'ppcp.asset-version' );