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_
1082 Views
0
(0)

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).

How useful was this blog?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this blog.

Leave a comment

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