From 0ce071e9805d7b99bd98bb65262b2fe1b2e6e1b6 Mon Sep 17 00:00:00 2001 From: Travis Vachon Date: Thu, 12 Dec 2024 19:43:11 +0100 Subject: [PATCH] fix: tweak plan gate query param (#163) it turns out Stripe already adds the `checkout.session` query param to this URL - this means we don't even need to update Stripe to fix this! --- src/components/PlanGate.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/PlanGate.tsx b/src/components/PlanGate.tsx index 669f38f..d365f89 100644 --- a/src/components/PlanGate.tsx +++ b/src/components/PlanGate.tsx @@ -66,7 +66,7 @@ export function PlanGate ({ children }: { children: ReactNode }): ReactNode { export function MaybePlanGate ({ children }: { children: ReactNode }): ReactNode { const params = useSearchParams() - if ((process.env.NEXT_PUBLIC_DISABLE_PLAN_GATE == 'true') || (params.get('checkout') === 'true')) { + if ((process.env.NEXT_PUBLIC_DISABLE_PLAN_GATE == 'true') || params.get('checkout.session')) { return children } else { return {children}