WooCommerce Remove Cart Notices

WooCommerce remove added to cart message

Pre-Requisites

There are no pre-requisites in order for you to be able to implement this solution.

How To Implement This Solution?

Simply copy the pre-coded solution to your active theme’s functions.php or preferably the Code Snippets Plugin.

About this Solution

When adding or removing a product to or from the cart in WooCommerce, a message appears under the header letting the the user know the action has been successful. These messages are known as cart notices in WooCommerce. Depending on the theme, these notices can sometimes be quite annoying and are sometimes just not needed. Instincts tell us to click in the top right hand corner of the screen where the cart icon is when a product has been added. A lot of the time, the menu cart notification bubble will tell a user if a product has been added successfully or not. This guide shows you how to remove both the ‘product added to cart’ as well as the ‘product removed from cart, undo?’ cart notices.

				
					/**
 * Snippet Name:	WooCommerce remove cart notices
 * Snippet Aurthor:	ecommercehints.com
 */

// Remove "added to cart" notice
add_filter( 'wc_add_to_cart_message_html', '__return_false' );

// Remove "product was removed. Undo?" notice
add_filter('woocommerce_cart_item_removed_notice_type', '__return_false');
				
			

Snippet Benefits

  • Remove the annoying cart notices for a more streamlined user experience.
WooCommerce Conversion Rate Optimisation (CRO) eBook
100 WooCommerce Conversion Rate Optimisation Tips

Leave a Reply

If you are going to write code in the comments, please wrap it between code tags.

Your email address will not be published. Required fields are marked *

Other Recent Guides

Subscribe To Emails

Get exclusive WooCommerce tips that I only share with email subscribers

Join hundreds of other subscribers