Join

WooCommerce Redirect After Registration

Don't want to mess with code snippets? This is a feature of MyListing Pro.

Instructions

  1. Create a new PHP code snippet.
  2. Copy the contents of code snippet below.
  3. Paste the contents into your code snippet.
  4. Review any notes that I’ve provided.
  5. Save and enable the code snippet.
  6. Test.

Snippet

Out of the box, WooCommerce redirects users to their Dashboard (i.e., My Account), which may not be desirable for website owners.

Adjust the ‘$redirect = “https://domain.com/page-url”;’ entry on Line 4 to match your website’s desired URL.

add_filter("woocommerce_registration_redirect", "wcs_register_redirect");
function wcs_register_redirect($redirect)
{
    $redirect = "https://domain.com/page-url";
    return $redirect;
}