Testing Checkout in Theme Editor
When testing your store's Checkout process, be sure to test outside of the Theme Editor. Shopify's Checkout is considered as an external page in the Theme Editor. You'll likely see an error message like this when going to Checkout in the Theme Editor:
To avoid that message, use Theme actions which is located at the bottom left of the Theme Editor:
Choose View theme:
If you're using a Draft theme, choose Preview theme:
Now you'll be previewing your theme like a customer. Checkout will function correctly when you View your theme or Preview your theme. Checkout is external to the Theme Editor.