Black Friday & Cyber Monday SUPER SALE ALL WEEK:
Grab 40% OFF on plugins
Days
Hours
Minutes
Seconds

How to Change the URL for ‘Return to Shop’ in WooCommerce?

Do you want to customize the destination URL when customers click on the button “Return to Shop”? A simple code snippet will make it easy for you!

add_filter( 'woocommerce_return_to_shop_redirect', 'ts_change_return_shop_url' );
 
function ts_change_return_shop_url() {
   return home_url();
}

Output

When your shopping cart is empty, it typically displays the “Return to Shop” button. Clicking on this button redirects you to the home page, as specified in the code.

How to Change the URL for 'Return to Shop' in WooCommerce?

Clicking on the ‘Return to shop’ button redirects users to the home page.

How to Change the URL for 'Return to Shop' in WooCommerce?

Customization of redirecting a button to the specific URL that you want is one easy way to make your customers land on the page you wish. Similarly, you can also customize the proceed to checkout redirect link in WooCommerce that will skip the entire cart page when view cart button is clicked.

Browse more in: Code Snippets, WooCommerce How Tos, WooCommerce Tutorials

Share It:

Subscribe
Notify of
0 Comments
Newest
Oldest
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x