Tom Wilson Posted October 15, 2019 Share Posted October 15, 2019 Hi guys I want to be able to add the below to any customer that is logged in: <!-- Start of magicwebdesignshelp Zendesk Widget script --> <script id="ze-snippet" src="https://static.zdassets.com/ekr/snippet.js?key=7f9fba61-cc12-4564-a455-853beb469132"> </script> <!-- End of magicwebdesignshelp Zendesk Widget script --> How would I do this? Thanks Tom 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 16, 2019 Share Posted October 16, 2019 Tom, 18 hours ago, Tom Wilson said: How would I do this? you could try modifying the hook I posted in the thread below... <?php # Tom's Widget Footer Hook # Written by brian! function tom_widget_footer_hook($vars) { $client = Menu::context('client'); if ($client) { return <<<HTML <!-- Start of magicwebdesignshelp Zendesk Widget script --> <script id="ze-snippet" src="https://static.zdassets.com/ekr/snippet.js?key=7f9fba61-cc12-4564-a455-853beb469132"> </script> <!-- End of magicwebdesignshelp Zendesk Widget script --> HTML; } } add_hook("ClientAreaFooterOutput", 1, "tom_widget_footer_hook"); what that hook does is add your widget code to the footer template if the client is logged in... now whether the widget code works in WHMCS, I don't know - but no doubt, you'll mention if it doesn't. 🙂 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.