add_filter( 'wc_add_to_cart_message_html', '__return_false' );
Please try this if that works. might be that comes from the JS but still try if above code work.
I need to remove the notice that appears at the cart site when I update the amount of items in the basket. (When I click update, a small popup appears: “Cart was updated”)
From what I understand, you want to remove the notice that pops up on the cart page when you update the quantity of items in the basket. You’ve already successfully used code snippets to remove some other notifications and now you’re looking for the specific code to remove this last one.
You can use the following snippet to achieve this:
add_filter( 'woocommerce_cart_updated_notice_type', '__return_false' );
Here’s an image for your reference:
You should add this code to your child theme’s
functions.php file or via a plugin that allows custom functions to be added, like the Code Snippets plugin. Please note that it’s not advisable to add custom code directly to your parent theme’s
functions.php file. Doing so could lead to the code being erased when the theme is updated.
📌 Just a quick reminder: Before you make any changes, we strongly recommend that you create a backup of your full site and database. This is a crucial step to ensure that in case anything goes wrong, you can easily restore your site to its previous, functioning state.
I hope this helps! If you have any other questions or run into any issues, please don’t hesitate to ask.
Thank you so much Tamrat, that one worked perfectly!