Skip to content

Commit

Permalink
fix: tweak plan gate query param (#163)
Browse files Browse the repository at this point in the history
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!
  • Loading branch information
travis authored Dec 12, 2024
1 parent b399b37 commit 0ce071e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/PlanGate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 <PlanGate>{children}</PlanGate>
Expand Down

0 comments on commit 0ce071e

Please sign in to comment.