Created
October 1, 2020 15:42
-
-
Save kimcoleman/34b0ed7df368769f46021a3d70f1b150 to your computer and use it in GitHub Desktop.
Require a sponsor code for the "child" level checkout when using Paid Memberships Pro and the Sponsored/Group Membership Add On.
This file contains hidden or 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 | |
/* | |
* Require a sponsor code for the "child" level checkout when using | |
* Paid Memberships Pro and the Sponsored/Group Membership Add On. | |
* | |
* You can add this recipe to your site by creating a custom plugin | |
* or using the Code Snippets plugin available for free in the WordPress repository. | |
* Read this companion article for step-by-step directions on either method. | |
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
* | |
*/ | |
global $pmprosm_sponsored_account_levels; | |
$pmprosm_sponsored_account_levels = array( | |
1 => array( | |
'main_level_id' => 1, | |
'sponsored_level_id' => 2, | |
'seats' => 10, | |
'discount_code_required' => true, | |
), | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This recipe is included in the blog post on "Require a Sponsor Code for Checkout for a Sponsored Membership Level" at Paid Memberships Pro here: https://www.paidmembershipspro.com/require-a-sponsor-code-for-checkout-for-a-sponsored-membership-level/