Exclude PayPal subscriptions from free trial flow

This commit is contained in:
Emili Castells Guasch 2024-01-23 15:41:59 +01:00
parent 02ecce58c5
commit 0160e42909
2 changed files with 3 additions and 2 deletions

View file

@ -137,7 +137,7 @@ const bootstrap = () => {
}
const isFreeTrial = PayPalCommerceGateway.is_free_trial_cart;
if (isFreeTrial && data.fundingSource !== 'card') {
if (isFreeTrial && data.fundingSource !== 'card' && ! PayPalCommerceGateway.subscription_plan_id) {
freeTrialHandler.handle();
return actions.reject();
}
@ -241,6 +241,7 @@ document.addEventListener(
if (!typeof (PayPalCommerceGateway)) {
console.error('PayPal button could not be configured.');
return;
return;
}
if (