• Our website includes several WooCommerce pages that allow signing up for classes via a form. The form is supposed to appear if you are logged into the site, as either an admin or a regular customer. Until this morning it was working fine. Now, whenever a regular customer tries to sign up for a class, the sign-up form doesn’t appear. Looking in console produces a huge list of errors, but the critical one appears to be this:

    jquery.min.js?ver=3.7.1:2 Uncaught ReferenceError: Cookies is not defined
    at HTMLDocument. (woocommerce.min.js?ver=8.6.1:1:371)
    at e (jquery.min.js?ver=3.7.1:2:27028)
    at t (jquery.min.js?ver=3.7.1:2:27330)

    Nothing was changed on the site over the weekend as far as I know. How can I fix this?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support shahzeen(woo-hc)

    (@shahzeenfarooq)

    Hi there!

    The error Cookies is not defined indicates that the js-cookie library (or similar cookie handling library) is either:

    • Not loaded on the page before WooCommerce’s JavaScript code expects it.
    • Conflicting with another script.
    • Possibly deregistered or removed by a theme or plugin.

    Just to verify, are you using any optimization plugins (such as WP Rocket, Autoptimize, or similar)? If so, please try deactivating that plugin and check if the issue persists.

    If you are not using any optimization plugins, I’d like to understand your site properly. Please share with us the necessary information below for us to investigate the issue further:

    • System Status Report?which you can find via WooCommerce > Status
    • Fatal error logs?(if any) under WooCommerce > Status > Logs.

    Please use https://pastebin.com/ or https://gist.github.com/ and share a link to that paste in reply here. Once we have more information, we’ll be able to assist you further.                                                                           

    Thread Starter jswoolf01

    (@jswoolf01)

    Thanks for the response. I’ve done some more studying of this, and I believe now that it’s not a plug-in error, but rather a configuration problem. I didn’t notice this before, but Console is also showing a series of errors of the form “Refused to execute script from ‘[url]’ because its MIME type (‘text/html’) is not executable, and strict MIME type checking is enabled.” All of the affected files are Javascript. I believe if these scripts were running, the other errors, including the ‘Cookie not defined’ error, would disappear.

    Plugin Support Zubair Zahid (woo-hc)

    (@doublezed2)

    Hello jswoolf01,

    Thank you for your reply.

    I understand you have done some research and determined that this is not a plugin problem but a configuration problem.

    Please don’t hesitate to contact us again if you need help again. ??

    Best regards.

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