# Update this with your stable site URL only for the production environment.
NEXT_PUBLIC_SITE_URL=
Assuming that the user just leaves this text as-is rather than deletes it for local testing, the template fails to create a checkout session. That's is because getURL in 'helpers.ts' is only using the localhost fallback when NEXT_PUBLIC_SITE_URL is non-existent, not when it's empty.
To fix this bug, I've added a check to see if the variable is empty, in which case we go to the fallback.
The example .env.local file contains this text:
Assuming that the user just leaves this text as-is rather than deletes it for local testing, the template fails to create a checkout session. That's is because
getURL
in 'helpers.ts' is only using the localhost fallback when NEXT_PUBLIC_SITE_URL is non-existent, not when it's empty.To fix this bug, I've added a check to see if the variable is empty, in which case we go to the fallback.