Answer the question
In order to leave comments, you need to log in
How to redirect to my account?
Moved the woocommerce authorization form to a separate page. Now, on a click to enter, authorization occurs, but there is no redirection to my account. How can I redirect to my account from a separate page?
Answer the question
In order to leave comments, you need to log in
The redirect rule after authorization can be set on the hooklogin_redirect
add_filter( 'login_redirect', 'login_redirect', 10, 3 );
function login_redirect( $redirect_to, $request, $user ) {
if ( is_plugin_active( 'woocommerce/woocommerce.php' ) ) {
return get_edit_user_link( $user->ID );
}
return $redirect_to;
}
woocommerce_login_redirect
, you can try to use itadd_filter( 'woocommerce_login_redirect', 'filter_function_name_7289', 10, 2 );
function filter_function_name_7289( $remove_query_arg, $user ){
// filter...
return $remove_query_arg;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question