Skip to content

Instantly share code, notes, and snippets.

@BoweFrankema
Last active August 23, 2017 15:12
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BoweFrankema/9f9b34235a1f43e3df88 to your computer and use it in GitHub Desktop.
Save BoweFrankema/9f9b34235a1f43e3df88 to your computer and use it in GitHub Desktop.
BuddyPress Easy Digital Downloads Page redirect
<?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