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

View the code on Gist.

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.

Share:

Leave a Reply