AXO: Fix the conditions for rendering Fastlane when shipping config is incompatible

This commit is contained in:
Daniel Dudzic 2024-08-01 18:44:31 +02:00
parent e9a71a9237
commit eab4f64a46
No known key found for this signature in database
GPG key ID: 31B40D33E3465483

View file

@ -87,6 +87,10 @@ class AxoModule implements ModuleInterface {
return $methods;
}
if ( ! $this->is_compatible_shipping_config() ) {
return $methods;
}
$methods[] = $gateway;
return $methods;
},
@ -150,7 +154,8 @@ class AxoModule implements ModuleInterface {
// Check if the module is applicable, correct country, currency, ... etc.
if ( ! $c->get( 'axo.eligible' )
|| 'continuation' === $c->get( 'button.context' )
|| $subscription_helper->cart_contains_subscription() ) {
|| $subscription_helper->cart_contains_subscription()
|| ! $this->is_compatible_shipping_config() ) {
return;
}