Template:Hook:AfterRegistrarFunction

From WHMCS Documentation

Revision as of 12:13, 1 July 2015 by Andrew (talk | contribs) (Protected "Template:Hook:AfterRegistrarFunction": Page Template ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))

Description

This page has moved to https://developers.whmcs.com/hooks/


Hook Type

Standard (What does this mean?)

Input Parameters

Variable Type Notes
params Array An array of parameters passed to the registrar function
results Array An array of results returned from the registrar function call
functionExists Boolean Does the function exist?
functionSuccessful Boolean Was the function call successful?

Return Type

None

Example

add_hook('{{{hookName|}}}', 1, function($vars) {
    if($vars['functionExists'] && !$vars['functionSuccessful']) {
    	//do something on function existing and failure
    	$domain = $vars['params']['sld'] . '.' . $vars['params']['tld'];
    }
});

Changelog