• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
MinutesGuide.com

MinutesGuide.com

It is Not Just About WordPress

  • Home
  • About
  • Blog
    • Blogger Talk
    • Email Marketing
    • Hosting Talk
    • Plugins
    • Themes
      • Extra & Divi
    • WPbeginner
      • Guide
      • Life Hacks
      • WP Fix
    • WP Security
    • WP SEO
    • WooCommerce
  • Services
  • Reference
  • Contact
  • Start Here
You are here: Home / WooCommerce / Ultimate Source to Create WooCommerce Custom Redirects

Ultimate Source to Create WooCommerce Custom Redirects

Post on April 3, 2018 | Updated on December 11, 2020 by FaizAlias 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.

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.

Filed Under: WooCommerce

Reader Interactions

Comments

  1. John says

    April 23, 2018 at 8:44 pm

    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 says

      April 23, 2018 at 10:14 pm

      Thanks John

      Reply

Leave a Reply Cancel reply

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

Primary Sidebar

Follow Me

  • Facebook
  • GitHub
  • LinkedIn
  • Pinterest
  • Twitter
  • YouTube

Start With…

Start Blogging
eShop Guide
WP Guide
WP Security

Categories

Footer

About MinutesGuide

Was founded in October 2017 by FaizAlias. The main goal of this site is to provide quality tips, tricks, hacks in easy way that you can learn it just in minutes.

Highlight Service

Ninja Tables Pro Installation And Setting
CSS Hero Plugin Installation And Setting
Divi Theme Installation & Settings
Build Complete eCommerce Site

Quicklink

Home
Services
Contact
Blog

Copyright © 2023 · Designed by SM Creative Studio | Hosted by Cloudways DMCA.com Protection Status

  • Privacy Policy
  • Terms of Use