My Account

WooCommerce Registration Redirect

WooCommerce Registration Redirect


There are no pre-requisites in order for you to be able to implement this solution. If you would like to redirect the user to a custom page, you will need the post ID of said page.

How To Implement This Solution?

Simply copy the pre-coded solution to your active theme’s functions.php or preferably the Code Snippets Plugin.

About This Solution

By default, when a user registers and creates an account on your WooCommerce website, they are redirected to their dashboard on the My Account page. This guide shows you how to change this and redirect the user to any page you like. We’ve also included a handful of most popular pages including how to redirect the user to: Home Page, Shop Page, Cart Page, Checkout Page, and any custom post or page, upon registration. Simply comment-out/un-comment the appropriate redirect you would like in place. For the custom page redirect, you will need the post ID of said page. To get the post ID, simply edit that page and the URL will show you the integer ID. Alternatively, you can hover over the post in the backend editor where you “Quick Edit” posts and you’ll see the ID there too. This particular example redirects the user to the homepage upon WooCommerce Account Registration.

 * Snippet Name:	WooCommerce Registration Redirect
 * Snippet Author:

add_filter( 'woocommerce_registration_redirect', 'ecommercehints_registration_redirect', 10, 1 );
function ecommercehints_registration_redirect( $redirection_url ){
    $redirection_url = get_home_url();									// Home page
	// $redirection_url = get_permalink( wc_get_page_id( 'shop' ) );	// Shop Page
	// $redirection_url = wc_get_cart_url();							// Cart Page
	// $redirection_url = wc_get_checkout_url();						// Checkout Page
	// $redirection_url = get_permalink( 12 ); 							// Custom Page (The ID of the post/page you would like to redirect to - replace '12')
    return $redirection_url;

Snippet Benefits

  • Redirect the user to a custom page upon WooCommerce account registration

100 WooCommerce Conversion Rate Optimisation Tips

This field is for validation purposes and should be left unchanged.

Let’s collaborate!

Need to outsource WordPress development?

Join forces with UnlimitedWP for an outsourced white label web development service you can truly rely on.

First Timer Here?

Sign up to receive 20% off on your first month with us.