• Resolved quantum17

    (@quantum17)


    Since updating to the new Woocommerce 3.1.0 the use of the following code no longer works to change the text:

    <p class="cart-empty"><?php _e( 'Insert new text here.', 'woocommerce' ) ?></p>

    Instead it duplicates the message twice on the cart with:

    <?php do_action( 'woocommerce_cart_is_empty' ); ?>

    Please can you help me change the text of ‘Your cart is currently empty’ to something else?

    Thanks

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

    (@mikejolley)

    In your theme functions.php,

    
    add_filter( 'wc_empty_cart_message', 'custom_wc_empty_cart_message' );
    
    function custom_wc_empty_cart_message() {
      return 'Insert new text here';
    }
    

    No need to change the template file any more.

    Thread Starter quantum17

    (@quantum17)

    Perfect thank you Mike

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Woo 3.1.0 – ‘Your cart is currently empty’ Text’ is closed to new replies.