The documentation for the backend events states that they don’t work when previewing a site. In that case, how should we test this code before it is deployed and made live?
If you are attempting to test a new order on Wix Stores, not only do you have to publish your site to test live you ALSO have to make sure you have upgraded your site with the correct premium package to accept payments online.
(You can publish site, then unpublish afterwards) Wix Editor: Unpublishing Your Site | Help Center | Wix.com
Okay, so currently there’s no way to test that new code won’t break the ordering process for all customers?
If I publish and something goes wrong, can I roll back to the last published version? It looks like the documentation you linked about unpublishing just makes the store completely inaccessible.
@alexmeuer Ah, so your site is live and you have made changes. So you don’t want to publish new changes to the existing live site until you have tested out the code?
Yes, you can publish and revert back to and older version (using site history settings).
Or you can simply publish, test it during a time where site traffic is low, then go back into the site and “turn off” the new code you added until you are ready to test again.
Unfortunately, this is the only way to test on a live site ---- for live transactions.
You could also test on a dummy site. But that would mean purchasing a Wix premium plan for testing live transactions. Then ‘move the code over’ to the real site once you’ve made sure it works.