Fastlane: Add a check to make sure that the Fastlane SDK token only gets requested for elegible stores

This commit is contained in:
Daniel Dudzic 2025-01-20 16:33:30 +01:00
parent addc5235b4
commit e4d567d444
No known key found for this signature in database
GPG key ID: 31B40D33E3465483

View file

@ -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 );