Title: Error in JS console
Last modified: December 1, 2020

---

# Error in JS console

 *  Resolved [mhogas](https://wordpress.org/support/users/mhogas/)
 * (@mhogas)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/error-in-js-console/)
 * Hey guys,
 * I’m getting an error in the console [https://d.pr/i/x6QBP3](https://d.pr/i/x6QBP3)(
   this.product_variations.reduce is not a function ).
 * And from looking in the script, seems that this.product_variations returns a 
   string, not an object eg: [https://d.pr/i/wQIbYI](https://d.pr/i/wQIbYI) .
 * Maybe JSON.parse( this.product_variations ) would be better fit in this scenario?
 * Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [pluginswoo](https://wordpress.org/support/users/pluginswoo/)
 * (@pluginswoo)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/error-in-js-console/#post-13754415)
 * [@mhogas](https://wordpress.org/support/users/mhogas/)
 * Could you disable all plugins except WooCommerce and swatches and check is it
   happening or not?
 * If it happens with WooCommerce, just change the theme and check is it happening
   with a different theme or not.
 * Just find out the plugin or theme which is creating conflict. I’ll try to fix
   it as soon as possible
 * Thank you
 *  Thread Starter [mhogas](https://wordpress.org/support/users/mhogas/)
 * (@mhogas)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/error-in-js-console/#post-13758993)
 * Thanks!!
 * Sure, i will ask the owner of the site if he can run some tests with a different
   theme and plugins disabled.
 * Most likely though, it’s a conflict, no doubt. However either way, i think it’s
   best to avoid future conflicts and try validating the data for different cases.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Error in JS console’ is closed to new replies.

 * ![](https://ps.w.org/woo-variation-swatches/assets/icon-256x256.gif?rev=3157951)
 * [Variation Swatches for WooCommerce](https://wordpress.org/plugins/woo-variation-swatches/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woo-variation-swatches/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woo-variation-swatches/)
 * [Active Topics](https://wordpress.org/support/plugin/woo-variation-swatches/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woo-variation-swatches/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woo-variation-swatches/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [mhogas](https://wordpress.org/support/users/mhogas/)
 * Last activity: [5 years, 6 months ago](https://wordpress.org/support/topic/error-in-js-console/#post-13758993)
 * Status: resolved