0

I'm trying to redirect this login button to a different page upon log in success. How do I do that without a plugin?

I tried checking the Woo Commerce settings and LearnDash settings and it does not change. I tried looking in the PHP file but am not really sure where to start.

picture of login modal

1

vimuth
  • 5,064
  • 33
  • 79
  • 116
Sarah
  • 11
  • 1

1 Answers1

0

You can use the filter "woocommerce_login_redirect", which will redirect the user after successful login. Follow the code below:

add_filter( 'woocommerce_login_redirect', 'my_login_redirect' );
function my_login_redirect( $redirect_to ) {
    $redirect_to = 'http://www.example.com/my-account/';
    return $redirect_to;
}

Hope this will help!