Skip to content

Fix Stripe upgrade button redirect loop#22

Merged
xaelophone merged 1 commit into
mainfrom
fix/stripe-upgrade-redirect-loop
Feb 25, 2026
Merged

Fix Stripe upgrade button redirect loop#22
xaelophone merged 1 commit into
mainfrom
fix/stripe-upgrade-redirect-loop

Conversation

@xaelophone

Copy link
Copy Markdown
Collaborator

Summary

  • Root cause: VITE_STRIPE_PRO_LINK was missing from Vercel production env vars. getProUpgradeUrl() returned '', rendering <a href=""> which reloaded the page in a loop.
  • Env fix: Added VITE_STRIPE_PRO_LINK to Vercel production via vercel env add.
  • Code fix: When getProUpgradeUrl() returns empty, render a disabled <span> instead of <a href=""> — prevents the redirect loop if the env var is ever missing again.

Test plan

  • Click "Become a Patron" on production → Stripe checkout opens (requires Vercel redeploy)
  • Remove VITE_STRIPE_PRO_LINK locally → button renders disabled, no page reload

🤖 Generated with Claude Code

When VITE_STRIPE_PRO_LINK is unset, getProUpgradeUrl() returns '' which
renders <a href=""> — reloading the current page in a loop. Now renders
a disabled button instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel

vercel Bot commented Feb 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hermes Building Building Preview, Comment Feb 25, 2026 4:16pm

Request Review

@xaelophone
xaelophone merged commit 1c0344b into main Feb 25, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant