Public Ticket #3825117

Agent - Switch to customers

Closed
Comments
3 Tickets
Tom started the conversation 2 years ago on February 21, 2025 at 1:04pm

Hi,

Is there a hook / action I can use to redirect an Agent to a specific page when they click Shop as Customer?

I also would like the Agent to automatically switch back to the agent dashboard once check out has been completed.


Thanks


Tom

2,762
KingsPlugins replied 2 years ago on February 24, 2025 at 5:39pm

Hello Tom,

Thank you for purchasing the plugin,

 

To set a different redirect link when an agent clicks on Shop as customer, please add this PHP snippet to your site:

https://pastecode.io/s/fudp3m3o

 

Regarding switching back automatically when the checkout is complete, this is more complex, but I think I was able to write a code snippet for it:

https://pastecode.io/s/iirjc1ej

This basically loads a script that clicks on that button, when the 'order received' page is reached. This may need some testing to make sure it works well, as the timing and how the script loads may differ depending on the site.

 

Kind regards,

Stefan

Sign In