WooCommerce

Redirect ‘Return To Shop’ Button URL To Custom Shop Page In WooCommerce

This is for anyone who makes custom shop pages for WooCommerce websites.

There is a ‘Return To Shop’ button the Cart and Checkout pages when are no products in your cart.

Instead of using display:none; try using this function instead! You can link to whatever page you’d like.

/* -- Changes the redirect URL for the Return To Shop button in the cart. -- */
function wc_empty_cart_redirect_url() {
return 'https://yourdomain.com/your-page/';
}
add_filter( 'woocommerce_return_to_shop_redirect', 'wc_empty_cart_redirect_url' );

For more information on how to do this, explore this article: Change The “Return to Shop” Button URL in the Cart Page.

Need Help?

Tell us about your project!

  • Date Format: MM slash DD slash YYYY
  • This field is for validation purposes and should be left unchanged.

Related articles

Menu
Google Rating
5.0
Based on 58 reviews
×