Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MaryOJob/fa907c7c4ce58c71569a16229f2e86b0 to your computer and use it in GitHub Desktop.
Save MaryOJob/fa907c7c4ce58c71569a16229f2e86b0 to your computer and use it in GitHub Desktop.
PMPro Multiple Gift Levels Example
<?php // do not copy this line please
/* PMPro Gift Levels Example */
global $pmprogl_gift_levels;
$pmprogl_gift_levels = array(
// Set level 11 as a "Purchase Gift" membership level to create a gift code for a free level 16 gift.
11 => array( // "Purchase Gift" level ID
'level_id' => 16, // Membership Level ID of the gift membership level.
'initial_payment' => 47, // The initial payment for the gift membership level.
'billing_amount' => 0, // The recurring billing amount for the gift membership level.The recurring billing amount for the gift membership level.
'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' => 0, // The number of "experiation_period"s before the gift membership level expires.
'expiration_period' => '' // The duration of the period used by "expiration_number". Possible values are "Day", "Week", "Month", and "Year" (without the quotes).
),
// Set level 12 as a "Purchase Gift" membership level to create a gift code for a free level 15 gift.
12 => array( // "Purchase Gift" level ID
'level_id' => 15, // Membership Level ID of the gift membership level.
'initial_payment' => 141, // The initial payment for the gift membership level.
'billing_amount' => 0, // The recurring billing amount for the gift membership level.The recurring billing amount for the gift membership level.
'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' => 0, // The number of "experiation_period"s before the gift membership level expires.
'expiration_period' => '' // The duration of the period used by "expiration_number". Possible values are "Day", "Week", "Month", and "Year" (without the quotes).
),
// Set level 13 as a "Purchase Gift" membership level to create a gift code for a free level 17 gift.
13 => array( // "Purchase Gift" level ID
'level_id' => 17, // Membership Level ID of the gift membership level.
'initial_payment' => 270, // The initial payment for the gift membership level.
'billing_amount' => 0, // The recurring billing amount for the gift membership level.The recurring billing amount for the gift membership level.
'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' => 0, // The number of "experiation_period"s before the gift membership level expires.
'expiration_period' => '' // The duration of the period used by "expiration_number". Possible values are "Day", "Week", "Month", and "Year" (without the quotes).
),
// Set level 14 as a "Purchase Gift" membership level to create a gift code for a free level 18 gift.
14 => array( // "Purchase Gift" level ID
'level_id' => 18, // Membership Level ID of the gift membership level.
'initial_payment' => 517, // The initial payment for the gift membership level.
'billing_amount' => 0, // The recurring billing amount for the gift membership level.The recurring billing amount for the gift membership level.
'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' => 0, // The number of "experiation_period"s before the gift membership level expires.
'expiration_period' => '' // The duration of the period used by "expiration_number". Possible values are "Day", "Week", "Month", and "Year" (without the quotes).
)
);
// Make these levels require a discount code at checkout.
$pmprogl_require_gift_code = array(16,15,17,18); // You can delete this line if you do not want these levels to require a discount code at checkout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment