criat Posted February 2, 2015 Share Posted February 2, 2015 Hello, I'm trying to make a hook that runs After Module Create. It should simply add the domain as a separate order with zero cost, just so the customer can see his domain on the client area. I've already tweaked the client area to show just expiration date and whois link for "domains" page. I've set this hook up, but it isn't working. if (!defined("WHMCS")) die("This file cannot be accessed directly"); function add_domain_on_create($vars) { $domain = $vars['params']['domain']; $userid = $vars['params']['userid']; $command = "addorder"; $adminuser = "admin"; $values["clientid"] = $userid; $values["domain"] = $domain; $values["billingcycle"] = "free"; $values["domaintype"] = "register"; $values["regperiod"] = 10; $results = localAPI($command,$values,$adminuser); } add_hook("AfterModuleCreate",1,"add_domain_on_create"); Can somebody help me out with that? 0 Quote Link to comment Share on other sites More sharing options...
dxdomain Posted February 3, 2015 Share Posted February 3, 2015 Hooks document in WHMCS http://docs.whmcs.com/Hooks 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.