-
Notifications
You must be signed in to change notification settings - Fork 2
/
hooks.php
33 lines (31 loc) · 969 Bytes
/
hooks.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
/**
* WHMCS SDK Arvan CDN Addon Module Hooks File
*
* Arvan CDN Addon module for WHMCS
*
* @copyright Copyright (c) WHMCS Limited 2017
* @license http://www.whmcs.com/license/ WHMCS Eula
*/
// Require any libraries needed for the module to function.
// require_once __DIR__ . '/path/to/library/loader.php';
//
// Also, perform any initialization required by the service's library.
/**
* Register a hook with WHMCS.
*
* This sample demonstrates triggering a service call when a change is made to
* a client profile within WHMCS.
*
* For more information, please refer to https://developers.whmcs.com/hooks/
*
* add_hook(string $hookPointName, int $priority, string|array|Closure $function)
*/
add_hook('ClientEdit', 1, function(array $params) {
try {
// Call the service's function, using the values provided by WHMCS in
// `$params`.
} catch (Exception $e) {
// Consider logging or reporting the error.
}
});