Home › Forums › WoodMart support forum › Empty cart – return to home.
Empty cart – return to home.
- This topic has 9 replies, 2 voices, and was last updated 2 weeks, 5 days ago by
Aizaz Imtiaz Awan.
-
AuthorPosts
-
September 13, 2025 at 12:41 pm #686271
shwetaParticipantHello team,
On our site, in both the empty cart page and the empty mini cart drawer, the button currently shows “Return to shop” and links to the Shop page.
We would like to:
Change the button label to “Return to home”
Change the button link to point to the home pageKindly furnish a patcher or a hotfix. You are a amazing theme. We love you.
September 15, 2025 at 8:42 am #686369
Aizaz Imtiaz AwanKeymasterHello,
To change this button text, try to use the Loco Translate plugin for this.
Please follow this guide: https://xtemos.com/docs-topic/translate-woodmart-theme-with-loco-translate/
For the button URL, please add below Custom Code to the function.php of the theme.
add_filter( 'woocommerce_return_to_shop_redirect', 'pk_change_return_shop_url' ); function pk_change_return_shop_url() { return home_url(); }
Best Regards,
September 16, 2025 at 12:27 pm #686623
shwetaParticipantHello Team,
Thank you for your suggestion. Unfortunately, the code provided does not work on our setup.
The empty cart page button still links to the Shop page instead of Home.
The empty mini cart drawer button also links to the Shop page.
It seems that in Woodmart, the default WooCommerce filter woocommerce_return_to_shop_redirect is not being applied, since both buttons are rendered through the theme’s custom template.
Could you please provide a theme-compatible patch or hotfix so that both the empty cart page and the empty mini cart drawer button link to the homepage?
Best Regards,
September 16, 2025 at 2:50 pm #686651
Aizaz Imtiaz AwanKeymasterHello,
Please try to find the redirection plugin, as our theme does not have such an option, WooCommerce does not provide the option either.
Best Regards,
September 17, 2025 at 2:16 pm #686808
shwetaParticipantCom’on sir, we do not have 18+ licenses for this. You always have furnished exact php. Or at least suggest a reliable hotfix.
September 17, 2025 at 2:32 pm #686812
shwetaParticipantDo I change the priority order of snippet to make this work? would that help?
September 17, 2025 at 3:09 pm #686826
shwetaParticipantPatcher 685012 was applied. It was to do with cart and checkout. Do you think that any other file is governing the cart and checkout now? and could it be the reason the code snippet is not working?
September 17, 2025 at 3:33 pm #686832
Aizaz Imtiaz AwanKeymasterHello,
Sorry to say, it requires customization and is beyond our support policy. Additional code customizations are out of our theme support scope.
Please follow this Guide and implement this on your site.
https://woolentor.com/doc/how-to-change-return-to-shop-link-in-woocommerce/
https://aovup.com/woocommerce/change-return-to-shop-link/
https://www.businessbloomer.com/woocommerce-change-return-shop-url/Hope this Helps!
Best Regards,
September 17, 2025 at 7:15 pm #686893
shwetaParticipantThank you so much. So So much.
function aovup_custom_woocommerce_return_to_shop_redirect() { return home_url(); // You can change this with the URL to which you want to redirect the customers. Make sure you add the URL within the quotes like 'https://mywebsitesite.com' } add_filter('woocommerce_return_to_shop_redirect', 'aovup_custom_woocommerce_return_to_shop_redirect'); // Change the text of the "Return to Shop" button function aovup_custom_woocommerce_return_to_shop_text( $translation, $text, $domain ) { if ( 'woocommerce' === $domain && 'Return to shop' === $text ) { $translation = 'Go Back to the Home Page'; // Change 'Go Back to the Product Page' to your desired text } return $translation; } add_filter( 'gettext', 'aovup_custom_woocommerce_return_to_shop_text', 30, 3 );
The code you shared works perfectly on the Empty Cart page. Thank you for that.
However, it does not affect the button in the Empty Mini Cart drawer (widget). Could you please guide us on which hook/filter applies to the mini cart empty button in Woodmart?
This will help us apply the same “Return to home” link for the empty mini cart as well.
Best Regards,
September 18, 2025 at 10:57 am #686978
Aizaz Imtiaz AwanKeymasterHello,
You can find it in the file
woocommerce/cart/mini-cart.php
Best Regards,
-
AuthorPosts
Tagged: cart, mini cart, redirect, return to shop
- You must be logged in to create new topics. Login / Register