Forked from greathmaster/pmpro-redirect-confirmation-page-based-on-level.php
Created
October 10, 2019 15:55
-
-
Save femiyb/9174760a8253ad197bf9a57c132d3d68 to your computer and use it in GitHub Desktop.
Redirect to different confirmation page based on level
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
<?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