For our customization want to change the WooCommerce Return to shop URL in WordPress then place the place the following snippet in functions.php within your theme folder!.

The WooCommerce Return to Shop button will use your shop archive to send customers back to the shop when the cart is empty. The following code will redirect to home page when you click Return to shop button in your empty cart page.

function change_empty_cart_button_url() {
	return site_url();	
}
add_filter( 'woocommerce_return_to_shop_redirect', 'change_empty_cart_button_url' );

Have any doubt, then comment here!

Leave a Reply

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