Here’s a really quick guide on tweaking your WooCommerce shop. Some of you aren’t using the typical shop catalog page to sell your product – you may be doing some cool things like using a pricing table or landing pages for your products instead. If this is the case, you don’t want the shop archive with your products in your store.
However, your empty cart may betray you. There’s this insidious little button that doesn’t care about whether or not you use the shop archive:
That WooCommerce Return to Shop button will use your shop archive to send customers back to the shop when the cart is empty. If a customer adds a product from a pricing table or elsewhere and removes it, you may not want this to happen.
Fortunately, there’s a really simple way to fix this without overriding a WooCommerce template (which you should try not to do in case of future updates). There’s a filter wrapped around that link so that we can change it with a very tiny snippet of code:
You can set this to the homepage URL (as this example does), or change this to any URL on your site instead by changing the
return value. For example. I could have used
return '/blog/'; instead to use my blog page as the target for this URL. You can set this to whatever location you’d like!
Now go forth and fix those pesky buttons 🙂 .