Redirect users to custom page/url after registration in Woocommerce ? | themelocation

Woocommerce: How to redirect users to custom page after registration?

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:

woocommerceAnd when the user registers it will take them to my account page.

woocommerceNow, 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:

woocommercePlace your code and click on update file button to save it.

Now go to registration page again and register a new user.

woocommerceThis time after registration, it will take you to the custom welcome page.

woocommerce

One Response to Woocommerce: How to redirect users to custom page after registration?

  1. Babusiaux Guillaume September 19, 2016 at 10:22 am #

    Hi,

    Saw your tutorial and i was wondering how to redirect after login or registration but by role user ?

Leave a Reply