• Resolved gerold1968

    (@gerold1968)


    Hi all, seems since 8.5.1 wc_add_notice doesn′t seem to work anymore?!

    I have some custom code which uses it and no more messages are shown.

    Can anyone help?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hey there, @gerold1968! Thanks for contacting us. I’m happy to help you.

    If you add a notice on the default way (Appearance > Customize > WooCommerce > Store Notice) does it show normally?

    Would you be able to switch to a default theme such as Storefront to see if the notice you added with the custom code shows?

    Furthermore, I’d like to understand your site properly. Please share with us the System Status Report which you can find via WooCommerce > Status > Get system report > Copy for support.

    Looking forward to your reply.

    Have a wonderful day!

    Thread Starter gerold1968

    (@gerold1968)

    Hi, I am not talking about the storewide notice (which works by the way…). I am talking about the buolt in funktion of woocommerce. I mean this one:

    Usagewc_add_notice( $message, $notice_type, $data );$message(string) (required)The text to display in the notice.$notice_type(string)The name of the notice type – either error, success or notice.
    Default:?<var>’success'</var>$data(array)Optional notice data.
    Default:?<var>array()</var>

    No updates (except Woo) were made and before all worked fine.

    Plugin Support Shameem R. a11n

    (@shameemreza)

    Hello @gerold1968,

    The wc_add_notice function is a core part of WooCommerce and should be working even after the update. If it’s not working as expected, it might be due to something else.

    Can we explore this a bit more? Are you currently using Block on your shop, cart and checkout page? I’d recommend giving the WooCommerce shortcode a try instead of the block to see if that helps resolve the issue.

    Looking forward to hearing from you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘wc_add_notice not working anymore?’ is closed to new replies.