I created a members dashboard area on a site recently and needed a custom login page which used the Woocommerce login form to log users into the site. If successful, I wanted them to be redirected to another front-end page. This handy little snippet goes into your functions.php file and allows you to redirect pretty much anywhere:
add_filter('woocommerce_login_redirect', 'pro_login_redirect');
function pro_login_redirect( $redirect_to ) {
$redirect_to = 'http://myexample.com/shop';
return $redirect_to;
}
You can also use existing WordPress calls to send a user to the home URL, front page, blog page. Eg, home page:
add_filter('woocommerce_login_redirect', 'pro_login_redirect');
function pro_login_redirect( $redirect_to ) {
$redirect_to = home_url();
return $redirect_to;
}
Or, how I used it and specified a unique page ID (in this case, page with ID 1020):
add_filter('woocommerce_login_redirect', 'pro_login_redirect');
function pro_login_redirect( $redirect_to ) {
$redirect_to = get_permalink( 1020 );
return $redirect_to;
}