![]() Server : Apache/2 System : Linux server-15-235-50-60 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64 User : gositeme ( 1004) PHP Version : 8.2.29 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname Directory : /home/gositeme/domains/gositeme.com/public_html/whmcs/includes/hooks/ |
The hooks system allows you to extend WHMCS functionality by placing files in the /includes/hooks directory.
WHMCS has a variety of hook points that run when specific events occur (for example, generating an invoice).
To use this system, write your own code and register it with a hook point. WHMCS will execute that code when the hook runs.
For a list of available hook points, see https://developers.whmcs.com/hooks/hook-index/.
To use the example hook code below, copy the code, beginning with '<?php', and paste it into a file in the /includes/hooks directory.
The filename must use the '.php' extension (for example, create_forum_account.php).
Filenames beginning with an underscore '_' will not be loaded.
<?php
if (!defined('WHMCS'))
die('You cannot access this file directly.');
function create_forum_account($vars) {
$firstname = $vars['firstname'];
$lastname = $vars['lastname'];
$email = $vars['email'];
// Add the code to create a remote forum account here.
}
add_hook('ClientAdd', 1, 'create_forum_account');