Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Allows sponsored recipients to individually pay for the seats given by their sponsored giver.
<?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
You can’t perform that action at this time.