PlsHelpMeTY
PlsHelpMeTY

Reputation: 37

How to remove Woocommerce cart notifications?

Question: How to remove the Woocommerce cart notifications as: "Product was removed from cart", "Product was added to your cart", "Show cart".

Platform: Wordpress & Woocommerce

Theme: Astra

Plugin: Elementor Pro

See photos for notifications I want to be removed.

Added to cart:

Added to cart

Removed from cart:

Removed from cart

What I have already done is removing the coupon code from the checkout page through some code in the functions.php but I don't know if it's possible to remove these notifications through code or other options?

Upvotes: 0

Views: 1032

Answers (1)

Ram
Ram

Reputation: 347

Here is hook to remove "Add to cart notifications" use this in functions.php

add_filter( 'wc_add_to_cart_message_html', 'dont_show_message');
function dont_show_message( $message, $products ) { 
    return ''; 
}; 

Or simply yon can use CSS to hide the same.

Upvotes: 0

Related Questions