Created
April 11, 2018 09:09
-
-
Save bappi-d-great/6c3548a4cb1e6fd3d6878b2ec43464ac to your computer and use it in GitHub Desktop.
WPMU Membership2: Set different thank you page based on membership
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 | |
add_filter( 'ms_model_pages_redirect_to', function( $url, $type, $args ) { | |
$subscription_id = $args['ms_relationship_id']; | |
$subscription = MS_Factory::load( 'MS_Model_Relationship', $subscription_id ); | |
$membership = $subscription->get_membership(); | |
if( $membership->id == XX ) | |
{ | |
$url = 'JOB PAGE URL'; | |
} | |
else if( $membership->id == YY ) | |
{ | |
$url = 'EXPERT PAGE URL'; | |
} | |
return $url; | |
}, 99, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment