Jump to content

Can I my own functions in hooks/actionhooks.php


martyn1

Recommended Posts

I have upgraded to 4.12 from 3.x and read about actionhooks at http://wiki.whmcs.com/Version_4.0_Release_Notes#Action_Hooks

 

In the old method I added a number of functions that were called by the hooks, can I do the same with this new method? Here's some pseudo code for the new method, would this work?:-

 

function actionhook_ClientSignup($vars) {
 if($vars["FirstName"] == "Tiger")
   do_something_wild($vars);
}

add_hook("ClientAdd",0,"actionhook_ClientSignup","");

function do_something_wild($vars) {
 // Code to handle wild customer orders
}

 

Thanks,

Martyn

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated