How do I change the link of the Return to shop button WooCommerce?

How do I change the link of the Return to shop button WooCommerce_
923 Views

WooCommerce default redirect on shop page when Cart is empty. The filter woocommerce_return_to_shop_redirect makes it easy to change Return to shop link.

<?php
add_filter( 'woocommerce_return_to_shop_redirect', 'cxc_woocommerce_change_return_to_shop_url' );

function cxc_woocommerce_change_return_to_shop_url() {
	return site_url();
}
?>

Code goes in function.php file of your active child theme (or active theme).

Was this article helpful?
YesNo

Leave a comment

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