You can change the return to shop link in WooCommerce in about two minutes, and there are three ways to do it. The right one depends on your cart page and how comfortable you are with code.
We checked each method against the WooCommerce 11.2.1 source code in October 2026. One detail matters before you start: the button only appears when your cart is empty. If a product sits in your cart and you cannot see the button, that is why.
In this guide, you will learn what the button is and which method suits your setup. You will also see how to change the button text and what to do when a change does not show.

What Is the Return to Shop Button in WooCommerce?
The “Return to Shop” button is a link WooCommerce shows on the cart page when the cart is empty. Its job is to send customers somewhere useful instead of leaving them stuck on a blank cart screen. By default, it points to your WooCommerce shop page.
Worth knowing before you change anything: the button does not appear when the cart has products in it. WooCommerce only shows it in the empty cart state. So if you are testing after a change and you cannot see the button, empty your cart first and refresh the page.
The link is controlled by the woocommerce_return_to_shop_redirect filter hook, which WooCommerce’s official hooks documentation describes as the standard way to manipulate values without editing core files. You have three main options for changing where it points.

Method 1: Change the Shop Page in WooCommerce Settings
This is the fastest option. No code needed. It works when you want the button to point to a different page that already exists on your site and can be set as your WooCommerce shop page.
Go to WooCommerce > Settings > Products. At the top of that screen, you will see a Shop page dropdown. Choose the page you want the button to link to. Then click Save changes.
That is it. The Return to Shop button will now point to whatever page you selected.
- The Trade-Off: This setting changes your shop page globally. It affects breadcrumbs, some theme layouts, and any other place WooCommerce references your shop URL. If you have a fully functional shop page and just want the button to redirect somewhere different, use Method 2 instead. This setting is best for stores that have replaced the default shop page entirely, or stores that never set one up in the first place.
- Blank Shop Page: If the Shop page dropdown is blank, WooCommerce does not print the Return to Shop button at all. The classic cart template only shows the button when a shop page is set. Assigning any page here brings the button back.

Method 2: Use the Filter Hook in Your Child Theme or Code Snippets
This is the right approach when you want to redirect the button to a specific URL without changing your shop page globally. It uses the woocommerce_return_to_shop_redirect filter from the classic cart-empty.php template. That filter is still there in WooCommerce 11.2.1 (October 2026). It only applies when your cart page uses the shortcode cart, and Method 3 covers the Cart block.
You have two safe ways to add this code. Pick one.
- Option A: Your child theme
functions.phpfile. This suits developers who are comfortable editing theme files. - Option B: The Code Snippets plugin. This suits store owners who prefer not to touch theme files.
Both produce the same result. The Code Snippets plugin is often the safer choice for store owners because the code lives in the database rather than a theme file. It therefore survives theme updates automatically.
Warning: Do not edit your parent theme functions.php directly. Any change you make there will be wiped out the next time the theme updates. Always use a child theme or a plugin like Code Snippets.
Step 1: Get the URL You Want to Redirect to
Copy the full URL of the page you want the button to point to. This could be your homepage, a product category page, a landing page, or any URL on your site.
Step 2: Add the Code

Paste this into your child theme functions.php or into a new snippet in Code Snippets:
add_filter( 'woocommerce_return_to_shop_redirect', 'devdiggers_change_return_shop_url' );
function devdiggers_change_return_shop_url() {
return 'https://yoursite.com/your-page/'; // Replace with your URL
}
Replace https://yoursite.com/your-page/ with your actual URL. Keep the single quotes around it.
To redirect to your homepage specifically, use home_url() instead of a hardcoded URL:
add_filter( 'woocommerce_return_to_shop_redirect', 'devdiggers_change_return_shop_url' );
function devdiggers_change_return_shop_url() {
return home_url();
}
Step 3: Change the Button Text (Optional)

If you also want to change what the button says, add this second snippet alongside the first:
add_filter( 'gettext', 'devdiggers_change_return_shop_text', 30, 3 );
function devdiggers_change_return_shop_text( $translation, $text, $domain ) {
if ( 'woocommerce' === $domain && 'Return to shop' === $text ) {
$translation = 'Continue Browsing'; // Replace with your preferred text
}
return $translation;
}
Change 'Continue Browsing' to whatever label you want. The gettext filter checks the original English string. That means it works whatever language your store runs in.
WooCommerce also has a dedicated woocommerce_return_to_shop_text filter, added in version 4.6.0. It runs only for this one button, which keeps it lighter than a gettext filter that sees every string on the page.
add_filter( 'woocommerce_return_to_shop_text', 'devdiggers_return_shop_button_text' );
function devdiggers_return_shop_button_text() {
return 'Continue Browsing'; // Replace with your preferred text
}
The template wraps this text in esc_html() before it prints. Neither text filter changes the link in the Cart block.
Step 4: Save and Test
If you used Code Snippets, save and activate the snippet. If you used functions.php, save the file. Then:
- Go to your cart page.
- Remove all products from the cart.
- Refresh the page.
- Check that the Return to Shop button appears and click it to confirm the redirect works.
If the button is not showing, see the troubleshooting section below.
If you need to go further and build custom WooCommerce functionality beyond simple hook filters, take a look at our guide on how to create a WooCommerce plugin.
Method 3: Change the Browse Store Link in the Cart Block
Cart block stores need a different fix. The Cart block does not print the classic Return to Shop button, and the redirect filter has no effect on it. Its empty state shows a “Browse store” link instead, which you edit in the page editor.
The block cart became the default for new stores on block themes in WooCommerce 8.3, as the WooCommerce 8.3 release post explains. Stores set up after November 2023 should check this method first.
To see which cart you have, open Pages > Cart in the editor. A page that holds the [woocommerce_cart] shortcode uses Methods 1 and 2. A page that holds a Cart block uses these steps:
- Go to Pages > Cart and open the page in the block editor.
- Select the Cart block. In the block toolbar, open the eye button and pick Empty Cart.

- Click the “Browse store” link under the empty cart heading and edit its URL or its text.
- Save the page and test it in a private window with an empty cart.
WooCommerce writes that link into the page content when the block is first added. Changing the shop page in settings later does not update it. If your store had no shop page at that moment, the link is missing. You can add your own paragraph with a link in the same spot.
To add something new instead of changing a link, you can place a custom button on the WooCommerce cart page.
The Button Nobody Talks About: Continue Shopping

There is a second link that shows up at a different moment of the shopping flow. It has its own filter and needs its own snippet.
When a customer adds a product to their cart and WooCommerce is set to redirect them to the cart page, they may see a “Continue Shopping” link. This is controlled by a separate filter: woocommerce_continue_shopping_redirect.
To change where that link points, add this snippet:
add_filter( 'woocommerce_continue_shopping_redirect', 'devdiggers_change_continue_shopping_url' );
function devdiggers_change_continue_shopping_url() {
return home_url(); // Replace with your preferred URL
}
These are two different hooks serving two different moments. If you only add the first one and the Continue Shopping link still points somewhere unexpected, this is why.
What to Do If Your Change Is Not Showing
The most likely cause is the cache. Your site or browser is showing you a stored version of the page and not the updated one. This is the single most common reason a correct code change appears to do nothing.
Try these in order:
- Clear Your Site Cache: Go to your caching plugin (WP Super Cache, W3 Total Cache, LiteSpeed Cache, etc.) and purge all. If your host uses server-side caching, clear that too.
- Use a Private Window: Open the cart page in an incognito window. This bypasses your browser cache.
- Empty Your Cart: Remove every item and refresh. The button does not show if the cart has any items.
- Check the Theme You Edited: Make sure the code sits in a child theme. If you edited the parent theme’s
functions.phpand the theme updated since, your code is gone. - Look for a Cart Block: The redirect filter does nothing on a Cart block page. Use Method 3 there.
- Check for a Plugin Conflict: Some page builder plugins and cart replacement plugins override the WooCommerce empty cart template. Temporarily switch to the Storefront theme, disable non-essential plugins, and test the snippet again.
If none of these work, the most likely culprits are a custom cart-empty.php template in your theme overriding the default WooCommerce output, or a plugin that replaces the cart page entirely.
For more help with how your WooCommerce shop page is set up overall, see our guide on editing your WooCommerce shop page.
Conclusion
Changing the return to shop link in WooCommerce starts with one check. Find out whether your cart page uses the classic shortcode or the Cart block. Then test every change with an empty cart.
On a classic cart, the filter method with Code Snippets is the most flexible option. On a Cart block page, edit the Browse store link in the editor. If you are pointing the button at a completely different page, pair it with the woocommerce_continue_shopping_redirect filter so both moments in the shopping flow are covered.
Need custom WooCommerce work beyond what a snippet can handle? Our WooCommerce developers can help.
Frequently Asked Questions (FAQs)
Q1. Does changing the Return to Shop link affect SEO?
No. The Return to Shop button is only visible on the empty cart page. It does not affect crawlable URLs, site structure, or how search engines index your store.
Q2. Can I redirect the Return to Shop button to a specific product category?
Yes. Use the woocommerce_return_to_shop_redirect filter and return the URL of the category page. You can get a category URL in PHP using get_term_link( $category_id, ‘product_cat’ ). Replace $category_id with the numeric ID of your category.
Q3. Will my changes survive a WooCommerce update?
Yes. That holds as long as you added your code to a child theme’s functions.php or a Code Snippets snippet and not to WooCommerce’s own files or your parent theme. The woocommerce_return_to_shop_redirect filter is still in the classic cart template in WooCommerce 11.2.1 (October 2026). It does not apply to the Cart block.
Q4. What is the difference between the Return to Shop button and the Continue Shopping link?
The Return to Shop button shows on the empty cart page. The Continue Shopping link appears after a customer adds a product to the cart and is redirected. They are controlled by two separate filter hooks: woocommerce_return_to_shop_redirect and woocommerce_continue_shopping_redirect.
Q5. Can I show the Return to Shop button even when the cart is not empty?
Not with the default filter. The button is hard-coded to the empty cart template in cart-empty.php. To show a similar link on a non-empty cart, you need to add a custom button using the woocommerce_cart_actions action hook. This requires adding a small PHP snippet and is covered in the WooCommerce developer documentation.
Q6. Why does the Return to Shop button point to a 404 page?
Your WooCommerce shop page is either not set or points to a page that no longer exists. Go to WooCommerce > Settings > Products and check the Shop page dropdown. If it is blank or points to a deleted page, assign a valid page there and save.
