In this tutorial; We’ll learn how to redirect users to a custom page or url after successful registration. By default, when a new user registers the woocommerce takes him to the “my account” page.
Here is the default login screen:
And when the user registers it will take them to my account page.
Now, we need to redirect users to let’s say a welcome page.
To do this add the following lines of code at the end of your theme’s functions.php file:
function __my_registration_redirect(){ returnhome_url( '/welcome' ); } add_filter( 'registration_redirect', '__my_registration_redirect' );
You can access functions.php file here:
Place your code and click on update file button to save it.
Now go to registration page again and register a new user.
This time after registration, it will take you to the custom welcome page.
Hi,
Saw your tutorial and i was wondering how to redirect after login or registration but by role user ?