Redirection issue
-
Hey Team,
Your plugin is Fab and integrates very well but I am facing this redirection issue
When I click to Buddypress Profile tab it should open buddy press profile view tab rather it directly opens woocommerce my account orders tab.
After trying all your plugin settings Additionally, I tried following codes to fix the issue:
/** Woocommerce redirect from woo dashboard to orders tab Start **/
add_action(‘template_redirect’, ‘tab_redirect_to_orders_from_dashboard’ );
function tab_redirect_to_orders_from_dashboard(){if( is_account_page() && empty( WC()->query->get_current_endpoint() ) ){
wp_safe_redirect( wc_get_account_endpoint_url( ‘orders’ ) );
exit;
}
}
/** Woocommerce redirect from woo dashboard to orders tab end **//** Buddypress redirect to profile tab Start **/
add_filter( ‘bp_login_redirect’, ‘bpdev_redirect_to_profile’, 11, 3 );
function bpdev_redirect_to_profile( $redirect_to_calculated, $redirect_url_specified, $user ){
if( empty( $redirect_to_calculated ) )
$redirect_to_calculated = admin_url();
//if the user is not site admin,redirect to his/her profile
if( isset( $user->ID) && ! is_super_admin( $user->ID ) )
return bp_core_get_user_domain( $user->ID );
else
return $redirect_to_calculated; /*if site admin or not logged in,do not do anything much*/
}
/** Buddypress redirect to profile tab End **/Can you help me figure out what possibly be the issue or how can it be fixed?
The page I need help with: [log in to see the link]
- The topic ‘Redirection issue’ is closed to new replies.