Created
February 1, 2016 16:14
-
-
Save greathmaster/82c5ecab5fefe3d23850 to your computer and use it in GitHub Desktop.
Redirect to different confirmation page based on level
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 | |
function my_pmpro_confirmation_url($rurl, $user_id, $pmpro_level) | |
{ | |
if(pmpro_hasMembershipLevel(1)) | |
$rurl = "http://example.com/page_1"; | |
elseif(pmpro_hasMembershipLevel(2)) | |
$rurl = "http://example.com/page_2"; | |
elseif(pmpro_hasMembershipLevel(3)) | |
$rurl = "http://example.com/page_3"; | |
return $rurl; | |
} | |
add_filter('pmpro_confirmation_url', 'my_pmpro_confirmation_url', 10, 3); |
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 "Redirect Members to a Unique Confirmation Page Based on Membership Level" at Paid Memberships Pro here: https://www.paidmembershipspro.com/set-up-unique-membership-confirmation-pages-based-on-level/