Yang Posted June 17, 2018 Share Posted June 17, 2018 How to get current client page URL in hook? I tried $modulelink = $vars['modulelink']; , but it is not correct? add_hook('ClientAreaHeadOutput', 1, function($vars) } 0 Quote Link to comment Share on other sites More sharing options...
mbit Posted June 19, 2018 Share Posted June 19, 2018 Here are the parameters you can use: https://developers.whmcs.com/hooks-reference/output/#clientareaheadoutput Use the filename var for you needs? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted June 19, 2018 Share Posted June 19, 2018 58 minutes ago, mbit said: Here are the parameters you can use they are only *some* of the parameters - it's not a complete list... 59 minutes ago, mbit said: Use the filename var for you needs? I don't think that would work in all circumstances... e.g if it was the domains renewal page, the url could be http://demo.whmcs.com/index.php?rp=/cart/domain/renew, but $filename would just tell you it's index.php the $_server array would be one way, or with a bit of coding, you could also get it from other existing WHMCS $variables. $url = "http//$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; 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.