rgf207 Posted August 10, 2012 Share Posted August 10, 2012 I've read through the hook documentation but I still have a question. If you have a hook file created and it's in your hooks directory, will that file automatically be called when you execute the action for that hook location? If not, where do you define what file should be called when an action is complete? 0 Quote Link to comment Share on other sites More sharing options...
jclarke Posted August 10, 2012 Share Posted August 10, 2012 WHMCS will automatically load every file in the hooks.php directory. In your hook file you create your function then tell WHMCS when to run the function with a call to the add_hook function. For example, this is saying after a client is added run the create_forum_account function which is defined in the same file. add_hook("ClientAdd",1,"create_forum_account"); 0 Quote Link to comment Share on other sites More sharing options...
rgf207 Posted August 10, 2012 Author Share Posted August 10, 2012 WHMCS will automatically load every file in the hooks.php directory. In your hook file you create your function then tell WHMCS when to run the function with a call to the add_hook function. For example, this is saying after a client is added run the create_forum_account function which is defined in the same file. add_hook("ClientAdd",1,"create_forum_account"); That's exactly what I needed to know. Thank you for your help 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.