Jump to content
  • 0

WHMCS Action Hooks vs. Cpanel Hooks


mike2352

Question

Hi,

 

1) I'm wondering, what's the advantage, if any, of using WHMCS action hooks vs. the Cpanel Hooks to run a script after a new hosting account is created?

 

Wouldn't it be better to use the Cpanel hook directly?

http://twiki.cpanel.net/twiki/bin/view/AllDocumentation/ScriptHooks

 

and use this Cpanel hook?:

/scripts/postwwwacct

 

instead of the WHMCS action hook:

ClientAdd

 

2) If it's done via the Cpanel postwwwacct hook, would this still run only once WHMCS confirms that a payment has been received for the new hosting account and auto-creates the new hosting account?

 

3) If #2 is true, then would it be better to simply use the Cpanel hook? Or, am I missing something here?

 

Thank you in advance for your help!

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0
Hi,

 

1) I'm wondering, what's the advantage, if any, of using WHMCS action hooks vs. the Cpanel Hooks to run a script after a new hosting account is created?

 

Wouldn't it be better to use the Cpanel hook directly?

http://twiki.cpanel.net/twiki/bin/view/AllDocumentation/ScriptHooks

 

and use this Cpanel hook?:

/scripts/postwwwacct

 

instead of the WHMCS action hook:

ClientAdd

WHMCS is Hosting system independant.

The hooks are in whmcs incase you have to interact with say 2 systems. Cpanel and XYZPanel.

 

 

2) If it's done via the Cpanel postwwwacct hook, would this still run only once WHMCS confirms that a payment has been received for the new hosting account and auto-creates the new hosting account?

The cPanel account will only be created once payment is received (if you have whmcs configured that way) and the cPanel api will only run when the account is created in cpanel.

So by transferance and logic yes.

 

3) If #2 is true, then would it be better to simply use the Cpanel hook? Or, am I missing something here?

Each has its positives and negatives.

It all depends on the task. IF each cpanel server has different details then each server may be different. Also the whmcs hooks may have data that you need from custom fields etc. Like "Joomla Admin Password", this info may not be accessable from inside the cpanel hooks.

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
Answer this question...

×   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