Last active
April 13, 2021 04:28
-
-
Save strangerstudios/9073376 to your computer and use it in GitHub Desktop.
Use different Terms of Service (TOS) pages for different levels on the Paid Memberships Pro checkout page.
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
/* | |
Set TOS on checkout page. | |
Change the if/else statement below and change the post ids that $tospage is set to. | |
*/ | |
function my_option_pmpro_tospage($tospage) | |
{ | |
global $pmpro_level; | |
if($pmpro_level->id == 2) | |
{ | |
$tospage = 5708; //change this | |
} | |
else | |
{ | |
$tospage = 5697; | |
} | |
return $tospage; | |
} | |
add_filter("option_pmpro_tospage", "my_option_pmpro_tospage"); |
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 "Show a Different “Terms of Service” at Checkout Based on Membership Level" at Paid Memberships Pro here: https://www.paidmembershipspro.com/show-different-terms-service-checkout-based-membership-level/