How to Change Return to Shop URL in WooCommerce?

WooCommerce comes with a built-in return to shop link on the cart page. When a customer clicks on this link, it takes him back to the shop.

Quick Tip : Change the Sale badge text in WooCommerce

But, there are situations when you may want to change this link. For example if your website doesn’t have a shop page or you are using a custom shop page template.

To change the Return to Cart URL copy the following code and paste it inside your functions.php file.

//change return to cart link
function change_return_shop_url() {
    return home_url();  
}
add_filter( 'woocommerce_return_to_shop_redirect', 'change_return_shop_url' );
How to Change Return to Shop URL in WooCommerce?

How to Change Return to Shop URL in WooCommerce?

0 Comments

Leave a Comment.