• Resolved partynoparty

    (@partynoparty)


    I recently got an email from WordPress stating, “Your Site is Experiencing a Technical Issue.”

    The error was in regards to my functions.php script. Specifically a call to the wc_add_notice() notice.

    Error message: Uncaught Error: Call to undefined function wc_add_notice() in /home/mhfbcoop/public_html/wp-content/themes/mhfbc-theme/functions.php:431

    Is the wc_add_notice() function no longer available for use?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @partynoparty,

    Thank you for reaching out.

    The error message you’re seeing suggests that the function wc_add_notice() is being called before WooCommerce has had a chance to define it. This typically happens when the function is used in a theme or plugin that loads before WooCommerce does.

    The wc_add_notice() function is still available in WooCommerce. However, it’s important to ensure that WooCommerce is loaded before calling this function. You can do this by hooking your function to an action that runs after WooCommerce has loaded.

    I hope this helps.

    Thread Starter partynoparty

    (@partynoparty)

    thanks for clarifying that

    Hi @partynoparty,

    thanks for clarifying that

    You’re most welcome. I hope this gets to point you in the right direction.

    Should you have any further questions or concerns, please feel free to reach out. We’re here to help!

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.