Skip to content

Instantly share code, notes, and snippets.

@davidzack
Created October 16, 2016 18:19
Show Gist options
  • Save davidzack/6cb011e042d75834dac1dcb77ef0e7ea to your computer and use it in GitHub Desktop.
Save davidzack/6cb011e042d75834dac1dcb77ef0e7ea to your computer and use it in GitHub Desktop.
global $pmprogl_gift_levels;
$pmprogl_gift_levels = array(
// Set level 9 as a "Purchase Gift" membership level to create a gift code for a free level 5 gift.
9 => array(
'level_id' => 5, // Create a gift code for level 5
'initial_payment' => 0, // with an initial payment of $0.00
'billing_amount' => 0, // and no recurring billing amount
'cycle_number' => 0, // The number of billing cycles for the gift membership level.
'cycle_period' => '', // The billing cycle period. Possible values are "Day", "Week", "Month", and "Year" (without the quotes).
'billing_limit' => 0, // The billing cycle limit for the gift membership level.
'trial_amount' => 0, // The trial amount for the gift membership level.
'trial_limit' => 0, // The number of cycles the trial should last for the gift membership level.
'expiration_number' => 1, // This level expires in 1
'expiration_period' => 'Month' // month.
),
// Set level 10 as a "Purchase Gift" membership level to create a gift code for a free level 6 gift.
10 => array(
'level_id' => 6, // Create a gift code for level 6
'initial_payment' => 0, // with an initial payment of $0.00
'billing_amount' => 0, // and no recurring billing amount
'cycle_number' => 0, // The number of billing cycles for the gift membership level.
'cycle_period' => '', // The billing cycle period. Possible values are "Day", "Week", "Month", and "Year" (without the quotes).
'billing_limit' => 0, // The billing cycle limit for the gift membership level.
'trial_amount' => 0, // The trial amount for the gift membership level.
'trial_limit' => 0, // The number of cycles the trial should last for the gift membership level.
'expiration_number' => 3, // This level expires in 3
'expiration_period' => 'Month' // months.
),
// Set level 11 as a "Purchase Gift" membership level to create a gift code for a free level 7 gift.
11 => array(
'level_id' => 7, // Create a gift code for level 7
'initial_payment' => 0, // with an initial payment of $0.00
'billing_amount' => 0, // and no recurring billing amount
'cycle_number' => 0, // The number of billing cycles for the gift membership level.
'cycle_period' => '', // The billing cycle period. Possible values are "Day", "Week", "Month", and "Year" (without the quotes).
'billing_limit' => 0, // The billing cycle limit for the gift membership level.
'trial_amount' => 0, // The trial amount for the gift membership level.
'trial_limit' => 0, // The number of cycles the trial should last for the gift membership level.
'expiration_number' => 6, // This level expires in 6
'expiration_period' => 'Month' // months.
),
// Set level 12 as a "Purchase Gift" membership level to create a customized level 8 gift.
12 => array(
'level_id' => 8, // Create a gift code for level 1
'initial_payment' => 0, // with an initial payment of $0.00
'billing_amount' => 0, // and no recurring billing amount
'cycle_number' => 0, // The number of billing cycles for the gift membership level.
'cycle_period' => '', // The billing cycle period. Possible values are "Day", "Week", "Month", and "Year" (without the quotes).
'billing_limit' => 0, // The billing cycle limit for the gift membership level.
'trial_amount' => 0, // The trial amount for the gift membership level.
'trial_limit' => 0, // The number of cycles the trial should last for the gift membership level.
'expiration_number' => 1, // This level expires in 1
'expiration_period' => 'Year' // year.
)
);
$pmprogl_require_gift_code = array(5,6,7,8);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment