# 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.
This PR adds logic to go to the localhost fallback when the variable is empty.
The example .env.local file contains this text:
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.
This PR adds logic to go to the localhost fallback when the variable is empty.
Fixes #269. Also closes #236.