Ensured plan is lowercased before being passed

This makes sure that we can correctly match the plan against either
"monthly" or "yearly"
This commit is contained in:
Fabien "egg" O'Carroll 2022-11-02 16:00:41 +07:00
parent 4785e25fe4
commit 66b317ef78

View File

@ -68,7 +68,7 @@ export function planClickHandler({event, el, errorEl, siteUrl, site, member, cli
el.removeEventListener('click', clickHandler);
event.preventDefault();
let plan = el.dataset.membersPlan;
let requestData = getCheckoutSessionDataFromPlanAttribute(site, plan);
let requestData = getCheckoutSessionDataFromPlanAttribute(site, plan.toLowerCase());
let successUrl = el.dataset.membersSuccess;
let cancelUrl = el.dataset.membersCancel;
let checkoutSuccessUrl;