Last active
January 22, 2020 11:21
-
-
Save MaryOJob/f2c444ccb3ceca4aa341aeb07cc5becc to your computer and use it in GitHub Desktop.
Allows sponsored recipients to individually pay for the seats given by their sponsored giver.
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 | |
/* This codes requires you to have the sponsored Members Add On up and configured. | |
This code should also be added together with your configured sponsored members code in your PMPro customizations Plugin: https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
This script is an example that allows level 2 to purchase 5 membership accounts for level 3 but | |
have level 3 individualy pay $20 for their membership accounts. | |
Please see the add on guide for more attributes that can be configured for your sponsored members add on here: https://www.paidmembershipspro.com/add-ons/pmpro-sponsored-members/ | |
*/ | |
global $pmprosm_sponsored_account_levels; | |
$pmprosm_sponsored_account_levels = array( | |
//set 5 seats at checkout | |
2 => array( | |
'main_level_id' => 2, //redundant but useful | |
'sponsored_level_id' => array(3), //array or single id | |
'seats' => 5, // the number of membership accounts a sponsored member (giver) can purchase | |
'discount_code' => array( | |
'initial_payment' => '20', // the amount you want sponsored recipients to each pay for their accounts | |
'billing_amount' => '0' | |
) | |
) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment