Jump to content

About HOOK's


ajmeireles

Recommended Posts

19 hours ago, ajmeireles said:

Can I call the same hook function at differents php files?

For example:

hooka.php ->  using DailyCronJob hook function
hookb.php -> using the SAME DailyCronJob hook function, but to other proccess/operation.

yes.... but take notice of Priority values of each hook as they will define the order in which they're run (and that order might be important depending upon what each is doing).

https://developers.whmcs.com/hooks/priority/

Link to comment
Share on other sites

2 minutes ago, bear said:

The docs don't really explain much, as usual. Assuming that's the number in the first line of the hook, is 1 higher (as in more important) than 2 or the other way 'round? 

1 is highest.. I tend to use 1 by default when posting hooks here as i've no idea which other hooks could be running on the users site... in most circumstances, the priority value shouldn't matter - it's only when you need to ensure one runs after/before another that it would be relevant.

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