I’m developing a checkout extension and need to differentiate between the “Online Shop Checkout Editor” environment and a real cart. My extension requires a valid checkout/user to display properly, resulting in empty space when previewed in the editor.
Is there a way to detect if the extension is running in the editor vs. a real cart? I’ve tried using window.location, but there’s no access to the window object within the extension.
Ideally, I’d like to:
- Show a preview version of my extension in the editor
- Display the full, functional version in actual checkouts
Has anyone found a reliable method to achieve this? Any insights or workarounds would be greatly appreciated.
