I want to remove the “xx product has been added to your cart” message from the top of my checkout page.
How can I do that?
There was a suggestion by someone (link below), but it didn’t work for me.
Remove/Hide Woocommerce Added to Cart Message but Keep/Display Coupon Applied Message
Update for Woocommerce 3+
The hook
wc_add_to_cart_message
is deprecated and replaced bywc_add_to_cart_message_html
. You can use the following (compact effective way):Or the normal way:
Before Woocommerce 3, use this:
Removing only the message (pasting it to your
function.php
file inside your active child theme or theme). This function will return an empty message:Code goes in function.php file of your active child theme (or active theme).
Note:
wc_add_to_cart_message
replace deprecated hookwoocommerce_add_to_cart_message
.(UPDATED)
CSS: Removing top message box on checkout page (add this css rule to the
style.css
file located inside your active child theme or theme):You have to use this code in order to hide this
You can find more information here hide added to your cart