Hi
Would you use AfterModuleCreate ?
http://docs.whmcs.com/Hooks:AfterModuleCreate
Im using AfterRegistrarRegistration and have a hook running after someone buys a particular domain tld that sets the domain back to pending and sends an email to the customer
<?php
function hook_iedr_register_pending($vars) {
#error_reporting(E_ALL);
#ini_set('display_errors', true);
$domainid = $vars['params']['domainid'];
$tld= $vars['params']['tld'];
if ($tld=="ie") {
update_query("tbldomains",array("status"=>"Pending"),array("id"=>$domainid));
# Set Vars
$command = 'SendEmail';
$values = array( 'messagename' => 'More Information Needed', 'id' => $domainid, 'customtype' => 'domain');
$adminuser = 'admin';
# Call API
$results = localAPI($command,$values,$adminuser);
if ($results['result']!="success") echo "An Error Occurred: ".$results['result'];
#var_dump($results);
#exit;
}
}
add_hook("AfterRegistrarRegistration",1,"hook_iedr_register_pending");
?>