Product Page

WooCommerce Remove Cart Notices

WooCommerce Remove Cart Notices

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.

100 WooCommerce Conversion Rate Optimisation Tips

This field is for validation purposes and should be left unchanged.

Let’s collaborate!

Need to outsource WordPress development?

Join forces with UnlimitedWP for an outsourced white label web development service you can truly rely on.

First Timer Here?

Sign up to receive 20% off on your first month with us.

26027
WELCOME OFFER