Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

hookable event of addon domain creation?

Discussion in 'cPanel Developers' started by binooetomo, Dec 22, 2018.

  1. binooetomo

    binooetomo Member

    Joined:
    Sep 24, 2018
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Indonesia
    cPanel Access Level:
    DataCenter Provider
    Dear All ....

    Is there any Hookable event that trigered when addon domain created ?
    whosmgr only talk about 'parked domain'

    Sincerely

    -bino-
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,555
    Likes Received:
    2,182
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @binooetomo,

    You can find the corresponding API function for a hook by enabling "Debug mode is on. The system displays information about every stage for every hookable event, even if no hooks exist for that stage." under the "Development" tab in "WHM >> Tweak Settings". Then, perform the specific action you want to hook into via cPanel or WHM, and watch the output in /usr/local/cpanel/logs/error_log.

    For example, the following cPanel API 2 function is the hook event to utilize when creating a hook for the addition of a new domain using cPanel >> Addon Domains:

    Cpanel::Api2::AddonDomain::addaddondomain

    This API function is documented at:

    cPanel API 2 Functions - AddonDomain::addaddondomain - Developer Documentation - cPanel Documentation

    You can find general documentation on using hooks with cPanel functions at:

    Guide to Standardized Hooks - Cpanel Functions - Software Development Kit - cPanel Documentation

    You may also find the following tutorial helpful:

    Tutorial - How to Setup Standardized Hooks with BASH in cPanel & WHM

    Thank you.
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice