[Support request] WooCommerce 3.9 Issue

Home Forums Support [Support request] WooCommerce 3.9 Issue

Home Forums Support WooCommerce 3.9 Issue

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1140412
    Pedro

    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 );
    #1140807
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    You could try adding this CSS as well:

    .type-product .woocommerce-message {
        display: none;
    }

    Let me know 🙂

    #1140815
    Pedro

    Hello Tom!

    I added the CSS code but the message is still showing (I no longer have the code in functions.php)

    #1140817
    Tom
    Lead Developer
    Lead Developer

    Can you link me to a page where I can see it?

    #1140829
    Pedro

    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.

    #1140830
    Tom
    Lead Developer
    Lead Developer

    Try this:

    .woocommerce-message {
        display: none;
    }
    #1140833
    Pedro

    Hello Tom! The code worked but also hides all messages related to the products.

    Like messages when products are deleted or cart is updated.

    #1140836
    Tom
    Lead Developer
    Lead Developer
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.