Ultimate Source to Create WooCommerce Custom Redirects

by | Last updated Dec 11, 2020 | Published on Dec 11, 2020 | WooCommerce | 2 comments

Ultimate Source to Create WooCommerce Custom Redirects | WooCommerce is very flexible software. You can change anything that you want on it with ease. Today, I would highlight how you can make redirecting in WooCommerce.

For example, after users register on your WooCommerce, which one page you want to bring them after they register on your site.

woocommerce custom redirects

In this tutorial, we will cover

  1. User redirect after login on Woocommerce
  2. User redirect after logout on Wooocommerce
  3. User redirect after register on Woocommerce
  4. User redirect after adding an item to the cart on Woocommerce
  5. User redirect after clicking ‘return to shop’ on Woocommerce
  6. User redirect after clicking ‘continue shopping’ on Woocommerce

Create WooCommerce Custom Redirects

Before we start, I would like you to read our best hosting for WooCommerce. If you want to optimize your WooCommerce you must choose the best hosting.

#1. User redirect after login on Woocommerce

After users register on your Woocommerce site, which one the page you want to bring them. How to do this?

Step 1: Copy the code below.

Step 2: Open your functions.php and paste the code into it.

Step 3: On row “$redirect =” please change your URL’s page that you want to redirect the users to after they register into your site.

Save the changes of functions.php and test it.

#2. User redirect after logout on WooCommerce

By default when the user logout from Woocommerce, they will be brought to the homepage of the website.

But, you can customize it where you want to bring them.

How?

Follow this guide.

Step 1: Go to [code]/wp-content/YOUR_THEME/woocommerce/myaccount/my-account.php[/code]

Step 2: Search wp_logout_url( get_permalink( wc_get_page_id( ‘myaccount’ ) ) ). Approximately around line 21, you will find the following line.

Step 3: Change it to this wp_logout_url( ‘https://www.minutesguide.com/?p=3316’ ). Please change your own URL.

Click save and test it

#3. User redirect after register

Step 1: Copy the code below.

Step 2: Open your functions.php and paste the code into it.

Click save and test it.

#4. User redirect after adding an item to the cart

Step 1: Copy the code below.

Step 2: Open your functions.php and paste the code into it.

Click save and test it.

#5. User redirect after clicking ‘return to shop’ on the cart page

User redirect after clicking ‘return to shop’ on the cart page

Step 1: Copy the code below.

Step 2: Open your functions.php and paste the code into it.

Click save and test it.

#6. User redirect after clicking ‘continue shopping’ on Woocommerce

By default continue shopping button not available in Woocommerce. But, you can add it. After you add it on Woocommerce and if you want the user to redirect to something page after clicking on continue shopping you may follow this tutorial.

Step 1: Copy the code below.

Step 2: Open your functions.php and paste the code into it.

Click save and test it.

Conclusion

In this guide, you have learned about how to make redirect on WooCommerce for a certain part of it. It very easy for you to follow. If any problem please leave a comment below.

2 Comments

  1. If you like this article, then please FOLLOW our Linkedin, Twitter, YouTube, Pinterest, and Facebook. Do not forget to check our services page to upgrade your WordPress. If you find this post has an issue with copyright, outdated, or in error, please contact us to fix it.

  2. John

    Usually i never comment on blogs but your articles is so convincing that i never stop my self to say something about it you’re doing a great article keep it up

    Reply
    • FaizAlias

      Thanks John

      Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

Category

E

WP Tutorial

E

WooCommerce

E

Divi Theme Tutorial

E

cPanel Tutorial

E

SEO & Performance

E

Compare & Review

E

Grammarly

E

Blogger Talk

E

View All Categories

Arbor Design

895 South Randall Road, Chicago

Arbor & Landscaping

4999 Old Orchard Center, Chicago

Let's start work together

Pin It on Pinterest