Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function my_specific_redirect($redirect, $post_id) {
- if ( get_post_type( $post_id ) == 'course' ) {
- // Now I know this only affects courses
- $user_tags = wp_fusion()->user->get_tags();
- if ( in_array( 'Premium Member', $user_tags ) ) {
- $redirect = 'https://otherurl.com';
- } elseif ( in_array( 'Basic Member', $user_tags ) ) {
- $redirect = 'https://basic.com';
- }
- }
- return $redirect;
- }
- add_filter( 'wpf_redirect_url', 'my_specific_redirect', 10, 2 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement