I’m getting this javascript error which is preventing WooCommerce from working properly.
Uncaught TypeError: Cannot read property ‘length’ of undefined
at HTMLFormElement.<anonymous> (etheme.js:1634)
at HTMLFormElement.dispatch (jquery.js:3)
at HTMLFormElement.r.handle (jquery.js:3)
at Object.trigger (jquery.js:3)
at Object.a.event.trigger (jquery-migrate.min.js:2)
at HTMLFormElement.<anonymous> (jquery.js:3)
at Function.each (jquery.js:2)
at a.fn.init.each (jquery.js:2)
at a.fn.init.trigger (jquery.js:3)
at Object.success (add-to-cart-variation.min.js:1)
(anonymous) @ etheme.js:1634
dispatch @ jquery.js:3
r.handle @ jquery.js:3
trigger @ jquery.js:3
a.event.trigger @ jquery-migrate.min.js:2
(anonymous) @ jquery.js:3
each @ jquery.js:2
each @ jquery.js:2
trigger @ jquery.js:3
success @ add-to-cart-variation.min.js:1
i @ jquery.js:2
fireWith @ jquery.js:2
y @ jquery.js:4
c @ jquery.js:4
This is the plugin specifically that doesn’t work because of the JS error:
https://woocommerce.com/products/variation-swatches-and-photos/?_ga=1.98998686.1414477794.1486336660
It’s on etheme.js around line 1634. I’ve tried just commenting out that line in the file, however, it doesn’t work. What else could be done so that the theme works properly?