Skip to content

Instantly share code, notes, and snippets.

@bappi-d-great
Created April 11, 2018 09:09
Show Gist options
  • Save bappi-d-great/6c3548a4cb1e6fd3d6878b2ec43464ac to your computer and use it in GitHub Desktop.
Save bappi-d-great/6c3548a4cb1e6fd3d6878b2ec43464ac to your computer and use it in GitHub Desktop.
WPMU Membership2: Set different thank you page based on membership
<?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