Last active
August 23, 2017 15:12
-
-
Save BoweFrankema/9f9b34235a1f43e3df88 to your computer and use it in GitHub Desktop.
BuddyPress Easy Digital Downloads Page redirect
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 bp_edd_redirect() | |
//Redirect logged in users from edd page to BuddyPress page. Make sure to change the page slug correctly. | |
{ | |
if( is_user_logged_in() && is_page('purchases') ) | |
{ | |
global $bp; | |
wp_redirect( bp_loggedin_user_domain() . $bp->profile->slug . '/my-purchases/', 301 ); | |
exit(); | |
} | |
} | |
add_action('wp','bp_edd_redirect'); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment