Products and Services

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

AfterProductUpgrade

Parameters

VariableTypeNotes
item_idintService/Product ID which is upgraded to New Package/Plan
package_idintNew Package/Plan ID

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
item_idint

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
item_idintThe id of the product being saved.
tidintService/Product ID
account_typestringService/Product Type Name
gidintThe group id the product belongs to
titlestringName of Service/Product
descriptionstringDescription of Service/Product
eid_welcomeintThe id of the welcome email
domain_registration_optionstringYES/NO
server_config_option_showstringYES/NO
is_stock_controlstringYES/NO
unit_in_stockintQty in Stock
apply_taxstringYES/NO
highlight_textstringif Text exist then Service Featured
is_hiddenstringYES/NO
payment_timestringfree, onetime or recurring
price_durationstringMeans Recurring time period
auto_terminate_daysint
auto_terminate_emailint
prorata_billing_enablestringYES/NO
prorata_billing_dayint
charge_next_monthintProrata Charge Next Month
server_typestringServer/Module Name which is selected
server_group_idintServer Group ID
server_package_namestringServer Package Name which is selected/Entered
product_setup_afterstring

Product Auto Setup Options

ORDER_PLACED = Automatically setup the product as soon as an order is placed

PAYMENT_RECEIPT = Automatically setup the product as soon as the first payment is received

ORDER_ACCEPTTED = Automatically setup the product when you manually accept a pending order

MANUALLY = Do not automatically setup this product

product_upgrade_plans_enablestringYES/NO
product_upgrade_emailint
free_domainstring
free_domain_periodstring
free_domain_tldsstring
is_affiliate_payout_typestringOne Time/Recurring
affiliate_pay_amountfloat
custom_affiliate_payoutstringUse Default, Percentage, Fixed Amount, No Commission
subdomain_optionsstring
is_overages_billingstringYES/NO
disk_usage_limitsint
bandwidth_usage_limitsint
disk_usage_limits_costfloat
bandwidth_usage_limits_costfloat
product_upgrade_plansArray/Object
recurring_cycles_limitint
notesstring
module_configurationsjson

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
server_idint

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
server_idint

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
server_idint

Response

No response supported

Example Code

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