Viewing 6 replies - 1 through 6 (of 6 total)
  • You would put a display: none; for the CSS or go into the php file for thatr particular page and either delete the error msg line or set it to display none. A better way would probably add a custom div for the particular error msg you want to hide and add a css #div id { display none; } to hide it. Any web page in particular? Otherwise I don’t know which error msg you want to hide because there’s a lot of them. If the div class of the error msg is “woocommerce-message” then you’ll probably need to edit the WC php file to hide a particular msg.

    @kimsf Do you have an example of CSS so we can copy and paste?
    Not everyone are coders here. Thanks.

    Nazmul Hassan

    (@nazmulhassann20)

    @rgeruk can you please tell me that where you are getting this notice? if you can copy the original error then it will help me to find out the solution.

    Thanks @nayemDevs
    I’m getting the warning message above the shop products.
    The message says:
    “Sorry, this product cannot be purchased.”

    I have customised to work as catalogue instead of shop.

    The message is not use for me.

    The page is: https://whichstairliftsupplier.co.uk/

    If I could get a css example to switch off ‘woocommerce-error’ messages and to paste on the custom CSS, that would be great.

    Thank you.

    Caleb Burks

    (@icaleb)

    Automattic Happiness Engineer

    Hiding all error message may cause a lot of problems on your site. How will the customer know when something went wrong? What if they forgot to select a variation, or what if they forgot to add their email address at checkout?

    Hi Caleb Burks, I agree with your view. You got a point.
    However, the purpose of the shop is to work as catalog only. We are not selling the product via the website. We need to get an estimation onsite as each customer has a different situation. Nonetheless to say, due to the workaround to make it work as a catalog instead of the whole process, it has triggered the error message which is useless to what we intend to achieve.

    By the way, I have managed to do a work around the CSS code to mask the message.

    This is for people in similar situation and seeking a fix. Hope it helps.

    Here’s what I did.

    1. Navigate to the WP admin area
    2. Go to ‘Appearance’ > ‘Edit CSS’
    3. Add those lines
    .woocommerce-error {
    display: none;
    }
    4. Hit save and voila, the message is gone

    *Make sure you comment out your addition to the CSS as you will may forget in future what does it all means. 😉

    Good luck and may the force be with you.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How do I remove Woocommerce error messages from the screen?’ is closed to new replies.