Capturing WiX Restaurants Order State (On/Off)

Hi Velo Experts,

Is there any hints or tips you can give me on how to determine the state of WiX Restaurants when it is toggled on or off?

I’m looking for a coded way to determine the application state. Use case is that I have the ability to toggle WiX R On/Off on demand. When using multi-location and one restaurant location is On, yet another location is Off, the URL will redirect to the default location, or a location that is on. This is not the behavior we want.

We prefer that when a restaurant location is Off, that it not redirect to the other location. Instead we prefer to “detect” the state of the location and redirect them to another generic page that says the restaurant location is not taking orders ATM. I would assume I could code a way to determine state, and then (2) have an if else condition that would either redirect or do nothing.

I know if must be able to be done because WiX has a message that appears when a single location restaurant is Off, so there is a way that WiX detects that state somehow in the code. It could be as easy as reading and detecting the message that appears when a location is Off, or it could be something that could be identified in code by checking some on.load function variable, etc. That’s all I know/assume at this point.