Jump to content

Where to get started on learning how to use WHMCS Hooks?


Recommended Posts

Hello everyone!

First time posting here... I was trying to learn how to understand how WHMCS hooks work but I'm still having trouble figuring that out. How does one exactly have the hook run? I see how to kind of create them but not sure how to test or run them.

I looked through here: https://developers.whmcs.com/hooks/

but I felt that it was too descriptive enough on how it all works and all the syntax. I guess it uses php so there's that. 

My goal is to get a better understanding of hooks and am trying to customize the front home page to display the services/products that are currently for sale. 

Thanks in advance!

Link to comment
Share on other sites

On 04/06/2019 at 07:11, Rocketboy235 said:

How does one exactly have the hook run?

specific hooks automatically run on specific pages or triggered by specific events... you don't need to make them run.

On 04/06/2019 at 07:11, Rocketboy235 said:

I see how to kind of create them but not sure how to test or run them.

create your code, make sure you've chosen the correct hook that will be triggered for your purpose (E.g ClientAreaPage will run automatically on every page in the client area)

On 04/06/2019 at 07:11, Rocketboy235 said:

My goal is to get a better understanding of hooks and am trying to customize the front home page to display the services/products that are currently for sale. 

perhaps do a search here for ClientAreaPage, or perhaps in your above example, ClientAreaPageHome (as that hook is triggered only on the homepages), and you should find many example hooks... examine them, take them apart, play with them and you should learn a lot by experimenting with them.

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