Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save itsjusteileen/a775140e698287ff84a3c4dd36f35f51 to your computer and use it in GitHub Desktop.
Save itsjusteileen/a775140e698287ff84a3c4dd36f35f51 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);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment