WPSlash

How to Change the “Return to Shop” Link in WooCommerce

By default, WooCommerce includes a “Return to Shop” button on the empty cart page, directing customers back to the shop page. However, many store owners prefer redirecting users to a custom page, such as the homepage, a promotions page, or a restaurant menu.

With a simple WooCommerce filter, you can customize this button’s destination to match your store’s needs.


Why Customize the “Return to Shop” Link?

✔ Improves navigation – Redirect customers to a more relevant page, such as your homepage or menu.
✔ Enhances user experience – Avoids confusion if your WooCommerce shop page isn’t the main focus.
✔ Increases conversions – Send users to an engaging page where they’re more likely to continue shopping.
✔ Works seamlessly with WooFood – Ideal for restaurants and food delivery businesses using WooCommerce.


How to Change the “Return to Shop” URL in WooCommerce

To modify the Return to Shop button’s link, insert the following PHP snippet into your child theme’s functions.php file:

add_filter( 'woocommerce_return_to_shop_redirect', 'wpslash_change_return_shop_url');
function wpslash_change_return_shop_url() 
{
$url = home_url();
return $url;
}

How This Code Works

✅ Uses the woocommerce_return_to_shop_redirect filter to customize the button’s destination.
✅ Sets home_url() as the new redirect location, pointing users to the homepage.
✅ Can be easily modified to redirect customers to a different page, such as a promotions page, menu, or category page.

💡 Example: Want to send users to your restaurant’s food menu? Replace home_url(); with:

$url = site_url('/menu/');

Best Practices for Customizing the Return to Shop Button

🔹 Choose a strategic redirect – Consider sending users to a category page, featured promotions, or the homepage.
🔹 Ensure easy navigation – The new page should encourage users to continue shopping.
🔹 Test before applying to a live site – Verify the redirection works smoothly across devices.


Boost Your WooCommerce Food Ordering System with WooFood

For restaurant owners running a WooCommerce-powered food ordering system, customizing the Return to Shop button can guide customers back to your menu instead of a generic shop page.

With WooFood – The Ultimate WooCommerce Food Delivery Plugin, you can:

✅ Enhance the ordering experience – Redirect users directly to your restaurant menu instead of the default shop page.
✅ Optimize checkout flow – Improve the user journey by guiding customers to relevant sections.
✅ Support both pickup & delivery – Manage orders seamlessly through WooCommerce.
✅ Automate order processing – Streamline food order management with real-time tracking & notifications.

🚀 Upgrade Your WooCommerce Food Delivery Setup Today!

👉 Check out WooFood – The Best WooCommerce Plugin for Online Restaurants and improve your customers’ ordering experience!

Leave a Comment

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

Related Articles

Tutorials

How to Set Up SMS and WhatsApp Order Notifications for Your WooCommerce Restaurant (2026)

Why SMS and WhatsApp Notifications Matter for Restaurant Orders A customer places an order on your <a href="https://www.wpslash.com/how-to-set-up-real-time-order-tracking-for-your-woocommerce-restaurant-website-2025-2/" title="How to Set Up Real-Time Order Tracking for Your <a href="https://www.wpslash.com/how-to-set-up-catering-and-large-group-orders-on-your-woocommerce-restaurant-website-2025/" title="How to Set Up Catering and Large Group Orders on Your WooCommerce Restaurant Website (2025)”>WooCommerce Restaurant Website (2025)”>restaurant website at 7:15 PM during the Friday rush. […]
May 3, 2026
Tutorials

How to Set Up Real-Time Order Tracking for Your WooCommerce Restaurant Website (2026)

Why Real-Time Order Tracking Matters for Restaurant Websites Picture this: a hungry customer places an order on your <a href="https://www.wpslash.com/how-to-build-a-customer-loyalty-program-for-your-wordpress-restaurant-website-2025/" title="How to Build a Customer Loyalty Program for Your <a href="https://www.wpslash.com/how-to-connect-your-wordpress-restaurant-website-to-doordash-uber-eats-grubhub-2025/" title="How to Connect Your WordPress <a href="https://www.wpslash.com/how-to-rank-your-restaurant-website-on-google-local-seo-for-wordpress-2025/" title="How to Rank Your Restaurant Website on Google: Local SEO for WordPress (2025)”>Restaurant Website to DoorDash, Uber […]
May 3, 2026
Tutorials

How to Set Up Catering and Large Group Orders on Your WooCommerce Restaurant Website (2026)

Why Catering and Large Group Orders Matter for Restaurant Revenue Most restaurant owners pour energy into optimizing their dine-in experience and individual delivery orders while overlooking a revenue channel that can transform their bottom line: catering. A single corporate lunch order for 30 people can equal what your dining room generates in an entire slow […]
May 2, 2026