Hooks:Products/Services

Home / Support / Documentation
From WHMCS Documentation
Jump to: navigation, search

Contents

Products/Services Hooks

AfterModuleCreate

This hook runs after a successful module create

Variables

  • serviceid - Service ID
  • domain - Domain Name
  • username - Username
  • password - Password
  • pid - Product ID
  • serverid - Server ID
  • producttype - Product Type (sharedaccount, reselleraccount, server or other)
  • moduletype - The module name that the hook is being called after
  • configoptionX - the product settings configoption1,configoption2,etc...
  • customfields - an array of custom fields and their values - fieldname => value
  • configoptions - an array of configurable options and their values - optionname => value

Note These are all passed within the $params array. So service ID would be $vars['params']['serviceid'] etc.

PreModuleCreate

This hook runs before the account creation

Variables

  • Module Parameters (Same as Above)

AfterModuleSuspend

This hook runs after a successful module suspend

Variables

  • Module Parameters (Same as Above)

PreModuleSuspend

This hook runs before the account suspension

Variables

  • Module Parameters (Same as Above)

AfterModuleUnsuspend

This hook runs after a successful module unsuspend

Variables

  • Module Parameters (Same as Above)

PreModuleUnsuspend

This hook runs before the account unsuspension

Variables

  • Module Parameters (Same as Above)

AfterModuleTerminate

This hook runs after a successful module terminate

Variables

  • Module Parameters (Same as Above)

PreModuleTerminate

This hook runs before the account terminate

Variables

  • Module Parameters (Same as Above)

AfterModuleRenew

This hook runs after a successful module renew

Variables

  • Module Parameters (Same as Above)

PreModuleRenew

This hook runs before the account renewal

Variables

  • Module Parameters (Same as Above)

AfterModuleChangePassword

This hook runs after a successful password change. This can be done through the Client or Admin area

Variables

  • Module Parameters (Same as Above)

AfterModuleChangePackage

This hook runs after a successful package change

Variables

  • Module Parameters (Same as Above)

AdminServiceEdit

This hook runs after pressing Save Changes in the Admin area on the product

Variables

  • serviceid

CancellationRequest

This hook runs when submitting a cancellation request through the Client Area or Admin area

Variables

  • userid
  • relid
  • reason
  • type

AfterProductUpgrade

This hook runs after an Upgrade order where the package is changed.

Variables

  • upgradeid

AfterConfigOptionsUpgrade

This hook runs after an Upgrade order where the configurable options are changed.

Variables

  • upgradeid