Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save greathmaster/82c5ecab5fefe3d23850 to your computer and use it in GitHub Desktop.
Save greathmaster/82c5ecab5fefe3d23850 to your computer and use it in GitHub Desktop.
Redirect to different confirmation page based on level
<?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);
@laurenhagan0306
Copy link

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/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment