Hello
@MACscr
1. The quickest way to see if an event is hookable is to enable the following setting for the
Standardized Hooks - Debug Mode option under the
Development tab in
WHM >> Tweak Settings:
Debug mode is on. The system displays information about every stage for every hookable event, even if no hooks exist for that stage.
Once this is enabled, perform the action you want to hook into using either cPanel or Web Host Manager, and then monitor the
/usr/local/cpanel/logs/error_log output to identify the hook action. The following tutorial includes some helpful information:
Introduction This guide is for cPanel users who have root access on their cPanel server and would like to add custom functionality to cPanel and/or WHM using the BASH scripting language. It is important to keep in mind that this guide only...
forums.cpanel.net
2. Hooks do not exist for all events, and DNS zone deletion is one example of an event without a corresponding hook. I recommend voting for and adding a comment to the following feature request if you'd like to see a hook for DNS zone management (add/edit/delete):
3. One alternative to explore is the use of a custom dnsadmin plugin. We document more information along with an example on the link below:
documentation.cpanel.net
Let me know if this helps.
Thanks!