Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1130058

    Hi,
    I wanted to change the “Return to shop” button URL in the cart page to link to home. I used this code:

    /**
     * Changes the redirect URL for the Return To Shop button in the cart.
     *
     * @return string
     */
    function wc_empty_cart_redirect_url() {
    	return 'http://mywebsite.com/sample-page/';
    }
    add_filter( 'woocommerce_return_to_shop_redirect', 'wc_empty_cart_redirect_url' );
    

    I found the answer here: https://kriesi.at/support/topic/change-link-for-return-to-shop-button-in-woocommerce-cart/
    I inserted it into the functions.php of my child theme.

    And now, I need to change the text of the “Return to shop” button to “Return to home”.
    Thanks!

    #1130125

    Hey Angelo_Sule,

    You can use Loco Translate for this, to see what the results would be.

    Best regards,
    Basilis

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.