• Resolved cc3po

    (@cc3po)


    Hello!
    I would like to change the link of my “Return to Shop” button when my cart is empty.
    I found the following code and added it to my Divi Child functions.php

    function wc_empty_cart_redirect_url() {
    	return 'https://yourdomain.com/your-page/';
    }
    add_filter( 'woocommerce_return_to_shop_redirect', 'wc_empty_cart_redirect_url' );

    But it does not work.
    Did anyone here experience the same and would know how to help?
    That would be greatly appreaciated!

    I am on WP 4.5 WooCommerce Divi Child 2.5

    https://www.ads-software.com/plugins/woocommerce/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Mike Jolley

    (@mikejolley)

    That code is fine. If it’s not working, perhaps the button/link you’re seeing is not generated by WooCommerce. Themes can change this template file.

    Thread Starter cc3po

    (@cc3po)

    Thanks again Mike!
    Ill take this to Divi.
    Cheers!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Change link of "Return to Shop" button empty cart’ is closed to new replies.