# Redirect New Customers After Registration

> Sends customers who create an account from the My Account page to a page of your choice, such as a welcome page or the shop.

- Type: PHP
- Runs: Run everywhere
- Category: [WooCommerce](https://wpide.com/library/category/woocommerce/)
- Requires: WooCommerce
- Tags: woocommerce, registration, redirect, my-account
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/woo-registration-redirect/

## Code

```php
add_filter( 'woocommerce_registration_redirect', function ( $redirect ) {
    $page_slug = 'welcome'; // Slug of the destination page.

    $page = get_page_by_path( $page_slug );

    return $page ? get_permalink( $page ) : wc_get_page_permalink( 'shop' );
} );
```

## Notes

Set $page_slug to the slug of the page to send new customers to.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Redirect New Customers After Registration" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
