Do not execute current free trial flow if vault v3 enabled

This commit is contained in:
Emili Castells Guasch 2024-04-03 09:59:40 +02:00
parent 5cdb1bbce0
commit 2bf3c14feb
6 changed files with 37 additions and 9 deletions

View file

@ -137,7 +137,12 @@ const bootstrap = () => {
}
const isFreeTrial = PayPalCommerceGateway.is_free_trial_cart;
if (isFreeTrial && data.fundingSource !== 'card' && ! PayPalCommerceGateway.subscription_plan_id) {
if (
isFreeTrial
&& data.fundingSource !== 'card'
&& ! PayPalCommerceGateway.subscription_plan_id
&& ! PayPalCommerceGateway.vault_v3_enabled
) {
freeTrialHandler.handle();
return actions.reject();
}