Jump to content

action hooks :: aftermodulecreate


nici

Recommended Posts

hello,

 

In many actions hooks; the parameters available are not mentioned like as below

 

AfterModuleCreate - params

AfterModuleSuspend - params

AfterModuleUnsuspend - params

AfterModuleTerminate - params

AfterModuleChangePassword - params

AfterModuleChangePackage - params

 

What exactly is available as variable? I can not do var_dump as it is a live site. I need to know the list of variables available.. can someone help me?

 

Thanks,

 

Nici S

Link to comment
Share on other sites

just code a hook an fopen/fwrite the output ;)

anyway here is an example with printr :

 

whmcs/includes/hooks/wuharhar.php

 

function mypleskstuffforexample($params)
{
$vars = func_get_args();
echo "<pre>";print_r($vars);echo"</pre>";
}
add_hook("AfterModuleUnsuspend",1,"mypleskstuffforexample","");

 

 

Output:
params Array (
		[accountid] => 
                   [serviceid] => 
                   [domain] => 
                   [username] => 
                   [password] => 
                   [packageid] => 
                   [pid] => 
                   [serverid] => 
                   [customfields] => Array
                       (
                           [Cusom Field] => 
                       )

                   [configoptions] => Array
                       (
                       )

                   [type] => 
                   [producttype] => 
                   [moduletype] => 
                   [configoption1] => 
                   [configoption2] => 
                   [configoption3] => 
                   [configoption4] => 
                   [configoption5] => 
                   [configoption6] => 
                   [configoption7] => 
                   [configoption8] => 
                   [configoption9] => 
                   [configoption10] => 
                   [configoption11] => 
                   [configoption12] => 
                   [configoption13] => 
                   [configoption14] => 
                   [configoption15] => 
                   [configoption16] => 
                   [configoption17] => 
                   [configoption18] => 
                   [configoption19] => 
                   [configoption20] => 
                   [configoption21] => 
                   [configoption22] => 
                   [configoption23] => 
                   [configoption24] => 
                   [clientsdetails] => Array
                       (
                           [userid] => 
                           [id] => 
                           [firstname] => 
                           [lastname] => 
                           [companyname] => 
                           [email] => 
                           [address1] => 
                           [address2] => 
                           [city] => 
                           [state] => 
                           [postcode] =>
                           [country] => 
                           [countryname] => 
                           [phonenumber] => 
                           [notes] => 
                           [password] => 
                           [currency] => 
                           [cctype] => 
                           [cclastfour] => 
                           [securityqid] => 
                           [securityqans] => 
                           [groupid] => 
                           [status] => 
                           [credit] => 
                           [taxexempt] => 
                           [latefeeoveride] => 
                           [overideduenotices] => 
                           [language] => 
                           [lastlogin] => 
                           [customfields1] => 
                           [customfields2] => 
                           [customfields3] => 
                           [customfields4] =>
                           [customfields5] => 
                           [customfields6] => 
                           [billingcid] => 
                       )

                   [server] => 
                   [serverip] => 
                   [serverhostname] => 
                   [serverusername] => 
                   [serverpassword] => 
                   [serveraccesshash] => 
                   [serversecure] => 

)

printr values deleted ...

Link to comment
Share on other sites

  • 3 weeks later...

For some reason "print_r" isn't working for me. I created a file called "newactionhook.php" and uploaded it into my hooks folder. Inside, it has the following coding:

 

<?php

function new_action_hook($params) {
   $vars = func_get_args(); 
   echo "<pre>";print_r($vars);echo"</pre>";
}

add_hook("PreShoppingCartCheckout",1,"new_action_hook","");

?>

 

When I go through the purchase process, nothing is echoed to the screen. Anyone have any ideas on why?

Link to comment
Share on other sites

  • 1 month later...
  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated