Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty NEXT_PUBLIC_SITE_URL env var breaks checkout in local testing #269

Closed
chriscarrollsmith opened this issue Nov 17, 2023 · 1 comment

Comments

@chriscarrollsmith
Copy link
Contributor

The example .env.local file contains this text:

# Update this with your stable site URL only for the production environment.
NEXT_PUBLIC_SITE_URL=

If the user leaves this variable empty rather than deleting it, the template fails to create a checkout session during local testing. That's because getURL in 'helpers.ts' is only using the localhost fallback when NEXT_PUBLIC_SITE_URL is non-existent, not when it's empty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants