Last active
October 22, 2020 19:06
-
-
Save MaryOJob/f4e6bbf7cb4349330745344cf991b348 to your computer and use it in GitHub Desktop.
PMPro example configuration code for the Gift Membership Add-On (2)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // Do not copy this line please | |
/** PMPro Gift Levels Example - See full information here: https://www.paidmembershipspro.com/add-ons/pmpro-gift-levels | |
* Add this code to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
* This example allows a member to check out on level 4 and after checkout, the member gets a code to give out that allows | |
* another user checkout on level 3, paying an initial amount of $100 for their membership which has no expiry date or recurring payment set | |
*/ | |
global $pmprogl_gift_levels; | |
$pmprogl_gift_levels = array( | |
// Set level 4 as a "Purchase Gift" membership level to create a gift code for a free level 3 gift. | |
4 => array( // “Purchase Gift” level ID | |
'level_id' => 3, // Membership Level ID of the gift membership level. | |
'initial_payment' => 100, // 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). | |
) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment