Skip to content

Products and Services

The following hooks are provided for Products and Services related events.

AfterProductUpgrade

Parameters

VariableTypeNotes
upgradeid

Response

No response supported

Example Code

<?php
add_hook('AfterProductUpgrade', 1, function($vars) {
    // Perform hook code here...
});

ProductDelete

Executes a product is being deleted.

Parameters

VariableTypeNotes
pidint

Response

No response supported

Example Code

<?php
add_hook('ProductDelete', 1, function($vars) {
    // Perform hook code here...
});

ProductEdit

Executes as a Product is being edited.

Parameters

VariableTypeNotes
pidintThe id of the product being saved.
typestring
gidintThe group id the product belongs to
namestring
descriptionstring
welcomeemailintThe id of the welcome email
showdomainoptionsbool
stockcontrolbool
qtyint
taxbool
is_featuredbool
hiddenbool
retiredbool
paytypestring
allowqtybool
recurringcyclesint
autoterminatedaysint
autoterminateemailint
proratabillingbool
proratadateint
proratachargenextmonthint
servertypestring
servergroupint
autosetupstring
configoptionsupgradebool
upgradeemailint
freedomainstring
freedomainpaymenttermsstring
freedomaintldsstring
affiliatepaytypestring
affiliatepayamountfloat
affiliateonetimebool
subdomainstring
overagesenabledbool
overagesdisklimitint
overagesbwlimitint
overagesdiskpricefloat
overagesbwpricefloat
ondemandrenewalconfigurationoverridestring
ondemandrenewalsenabledint
ondemandrenewalperiodmonthlyint
ondemandrenewalperiodquarterlyint
ondemandrenewalperiodsemiannuallyint
ondemandrenewalperiodannuallyint
ondemandrenewalperiodbienniallyint
ondemandrenewalperiodtrienniallyint
configoptionXstringint

Response

No response supported

Example Code

<?php
add_hook('ProductEdit', 1, function($vars) {
    // Perform hook code here...
});

ServerAdd

Executes as a server is created

Parameters

VariableTypeNotes
serveridint

Response

No response supported

Example Code

<?php
add_hook('ServerAdd', 1, function($vars) {
    // Perform hook code here...
});

ServerDelete

Executes as a server is being deleted.

Parameters

VariableTypeNotes
serveridint

Response

No response supported

Example Code

<?php
add_hook('ServerDelete', 1, function($vars) {
    // Perform hook code here...
});

ServerEdit

Executes as a server is being edited.

Parameters

VariableTypeNotes
serveridint

Response

No response supported

Example Code

<?php
add_hook('ServerEdit', 1, function($vars) {
    // Perform hook code here...
});