i want to hide/remove specific messages from woo commerce without modifying basic woocommerce plugin. There are several types of messages related to coupon like
- Coupon code already applied!
- Sorry! Coupon 12345 already applied to your cart. (here i essentially want to hide coupon code)
and several others similar to these coupon codes.
i just want to hide these type of coupon/cart messages, others are fine like "Product successfully added!" or any other error messages.
Basically the aim is to show all other messages (Error and success messages) but dont wanna show coupon messages and a coupon code in to these messages.
So, is there any way to do this by doing any hook etc, like one i've found to eliminate all message strings (if i am not wrong).
add_filter( 'woocommerce_coupon_message', '__return_empty_string' );
- One more thing is, one message is repeating on cart page several times when i add product in to the car. "Coupon code already applied!" 2,3, to 4 times.