Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #787315

    Hi,

    when adding our product twice to the cart, woocommerce shows this error: You cannot add another “PRODUCT NAME” to your cart.

    We found a code (shown below) to remove the success added to cart message on the checkout page but can’t find a code to remove that duplicate prduct error message, what should we add to the code below to suppress that error on second add to cart?

    add_filter( 'wc_add_to_cart_message', 'bbloomer_custom_add_to_cart_message' );
      
    function bbloomer_custom_add_to_cart_message() {
      
    echo '<style>.woocommerce-message {display: none !important;}</style>';
     
    }
    • This topic was modified 7 years, 7 months ago by yingyang.
    #787827

    Hey kilimats,
    Please try adding this code to the Quick CSS section under Enfold > General Styling or to your child themes style.css file:

    ul.woocommerce-error {
        display: none;
    }
    

    Best regards,
    Yigit

    #787971

    Nailed it thanks !

    #788148

    Hi,

    You are welcome! :)

    For your information, you can take a look at Enfold documentation here – http://kriesi.at/documentation/enfold/
    And if there are features that you wish Enfold had, you can request them and vote the requested ones here – https://kriesi.at/support/enfold-feature-requests/
    For any other questions or issues, feel free to post them here on the forum and we will gladly try to help you :)

    Best regards,
    Yigit

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Remove Woocommerce error: You cannot add another’ is closed to new replies.