mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-30 05:00:51 +08:00
Check configuration later for not getting translation deprecated message
This commit is contained in:
parent
9276bab9f7
commit
df6127e601
1 changed files with 11 additions and 14 deletions
|
@ -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' );
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue