Ensure subscriptions intent added only when subscription product in cart

This commit is contained in:
emilicastells 2023-02-06 12:16:16 +01:00
parent a8616603aa
commit 74b13e6372
No known key found for this signature in database
GPG key ID: 1520C07081754570

View file

@ -109,6 +109,7 @@ return array(
if (
$settings->has( 'subscriptions_mode' )
&& $settings->get( 'subscriptions_mode' ) === 'subscriptions_api'
&& ( $subscription_helper->current_product_is_subscription() || $subscription_helper->cart_contains_subscription() )
) {
return 'subscription';
}