Archived topic
WooCommerce 3.9 Issue
7 replies · Started by Pedro on January 22, 2020
Hello! I recently updated WooCommerce to the latest version (3.9)
I had a code in the functions.php of the GP child theme.
That code hide the "product added" message on the cart page.
However, since I updated it shows an empty green field.
I would like that not to be shown.
Can you help me?
The code was:
/** Ocultar mensaje de producto añadido al carrito **/
function ocultar_wc_add_to_cart_message( $message, $product_id ) {
return '';
};
add_filter( 'wc_add_to_cart_message', 'ocultar_wc_add_to_cart_message', 10, 2 );
Hi there,
You could try adding this CSS as well:
.type-product .woocommerce-message {
display: none;
}
Let me know :)
Hello Tom!
I added the CSS code but the message is still showing (I no longer have the code in functions.php)
Can you link me to a page where I can see it?
Hello Tom! You can see an example in the following link: https://www.rebajaslocas.com/producto/corrector-de-juanetes-x2-uds/
Simply add the product to the cart, and you will see that it still shows the message of "Product added to the cart" on the cart page.
It is the message that appears on a green background.
Try this:
.woocommerce-message {
display: none;
}
Hello Tom! The code worked but also hides all messages related to the products.
Like messages when products are deleted or cart is updated.
I wonder if one of these solutions might work better?: https://stackoverflow.com/questions/34645095/remove-hide-woocommerce-added-to-cart-message-but-keep-display-coupon-applied-me