Hi All,
When a user decides to upgrade from Trial Package to Paid Package, I am trying get WHMCS to register the domain (the action hook i am using is: AfterProductUpgrade). NOTE: I have configured WHMCs such that it does not register the domain on sign up of free package.
i have created an action hook as per below but it is not working at all. Am i missing something obvious? Thanks!!
<?php
function register_domain_upgrade($vars) {
$command = "domainregister";
$adminuser = "admin";
$values["domainid"] = "1";
$results = localAPI($command,$values,$adminuser);
return $results;
}
add_hook("AfterProductUpgrade",1,"register_domain_upgrade");