mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 13:44:42 +08:00
Fastlane: Add a check to make sure that the Fastlane SDK token only gets requested for elegible stores
This commit is contained in:
parent
addc5235b4
commit
e4d567d444
1 changed files with 4 additions and 0 deletions
|
@ -74,6 +74,10 @@ class AxoBlockModule implements ServiceModule, ExtendingModule, ExecutableModule
|
|||
add_filter(
|
||||
'woocommerce_paypal_payments_localized_script_data',
|
||||
function( array $localized_script_data ) use ( $c ) {
|
||||
if ( ! $c->has( 'axo.available' ) || ! $c->get( 'axo.available' ) ) {
|
||||
return $localized_script_data;
|
||||
}
|
||||
|
||||
$module = $this;
|
||||
$api = $c->get( 'api.sdk-client-token' );
|
||||
assert( $api instanceof SdkClientToken );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue