Need to hide the amount of items added to the cart in the success message that appears after adding an item  in WooCommerce, the wc_add_to_cart_message_html filter has you covered.

woocommerce-hide-amount-item-message

Add the below code snippet to your functions.php

On line 24 a ternary operator has been removed which displayed the quantity if greater than 1 – now when you add an item the message will just reference the product title.

woocommerce-hide-amount-item-message-filter

You can also now adjust the other text that is used by adjusting the values in the $added_text variable.

2 Comments

  1. Sallie Goetsch on September 19, 2017 at 2:51 pm

    Your code snippet seems to have disappeared.

    • Neil Gowran on September 19, 2017 at 8:28 pm

      That’s weird, can see it here in an incognito not logged in.

Leave a Comment