Syntax
createUpgrade(
$name,
$to_product_id,
$upgrade_from=[],
$downgrade_from=[],
$special_offer_for=[],
$fallback_product_id=null,
$is_active='Y',
$buyer_readonly_keys='none‘
)
Creates an upgrade.
Access rights
Full access required.
Parameter
- name: Name of new upgrade
- to_product_id: The product being sold.
- upgrade_from: List of products separated by commas. Owners of one or more of these products can buy the product to_product_id as an UPGRADE. A change of subscription will become effective immediately.
- downgrade_from: List of products separated by commas. Owners of one or more of these products can buy the product to_product_id as a DOWNGRADE. A change of subscription will become effective at the beginning of the next billing period.
- special_offer_for: List of products separated by commas. Owners of one or more of these products can buy the product to_product_id as a MEMBER OFFER. The order of product to_product_id is not changed.
- fallback_product_id: If an upgrade is not possible (e.g. because the buyer does not own the necessary product), this product will be offered instead. The default is not to specify a product - then no purchase is possible.
- is_active: If Y, upgrade can be purchased there. Not if N. Default is Y.
- buyer_readonly_keys: Determines which of the buyer’s customer data should be protected (i.e. not changeable) for the purchase. Possible values are:
- none – None, i.e. the buyer can change email, name and address
- email – Only protect email, buyer can change name and address
- email_and_name – Protect email and name, buyer can change address
- all – Protect email, name and address