fbpx
Want To Add Extra Images Per Product Variation For Free? Download Now

Plugin Conflict Preventing Product Variation Selection on Specific Products

José Barros

Dear Support Team,

I am writing to report an issue we are encountering with the Variation Swatches plugin on our WordPress site, specifically related to products with multiple variations. The issue prevents customers from selecting different variations and adding certain products to their shopping cart.

Description of the Issue:
When attempting to select product variations from pages like this one – (https://tintas2000.pt/home/produtos/marina/), we are unable to select the variations, and the following JavaScript error is thrown in the console:

Uncaught TypeError: form.$form.block is not a function
at VariationForm.onFindVariation (add-to-cart-variation.js?ver=8.8.2:173:16)
at HTMLFormElement.dispatch (jquery.min.js:2:43064)
at v.handle (jquery.min.js:2:41048)
at Object.trigger (jquery.min.js:2:71515)
at HTMLFormElement. (jquery.min.js:2:72110)
at Function.each (jquery.min.js:2:3003)
at S.fn.init.each (jquery.min.js:2:1481)
at S.fn.init.trigger (jquery.min.js:2:72086)
at add-to-cart-variation.js?ver=8.8.2:45:10

This error seems to prevent the functionality that allows variations to be selected, directly impacting the ability to add these products to the cart.

Technical Information:

WordPress Version: 6.5.2
Variation Swatche: 2.0.30
Theme Being Used: Hello Elementor Child
Example Affected Product Page: https://tintas2000.pt/home/produtos/marina/

Steps to Reproduce:
– Visit the product page linked above.
– Try selecting different variations.
– Observe that the selection is not possible and the mentioned error appears in the JavaScript console.
– We have temporarily deactivated the plugin which resolves the issue, indicating a conflict between the plugin and the product variations script.

We request your assistance to resolve this conflict. We are prepared to provide any further logs, information, or access needed to facilitate the investigation and resolution of this issue.

Thank you in advance for your attention and looking forward to a solution or any procedures that might mitigate this conflict.

Best regards,
José

Hakik Zaman

Hi José,

Thank you for reaching out to us. Please kindly do a plugin compatibility check by doing these steps to identify the error :

=> Deactivate all of your additional plugins except WooCommerce and WooCommerce Variation Swatches Plugin.

=> See if the problem persists.

=> If the problem is resolved, you can understand which plugin might be the culprit of this error by activating your additional plugins one by one.

I can see you are using a child theme with several JS scripts inside the functions.php file. Please enable the parent Hello Elementor theme for a test.

Looking forward to hearing from you soon.

Thank you

José Barros

Hi,

 

Thank you for your prompt response and guidance on troubleshooting the plugin conflict.

 

I followed the steps you suggested to isolate the issue. Here are the results of my tests:

With only WooCommerce and WooCommerce Variation Swatches activated, the product variation selection works correctly.

Once I activate Elementor, the functionality stops working, and the JavaScript error reappears.

Deactivating the Variation Swatches plugin while Elementor is active resolves the issue again.

Additionally, I conducted these tests using both the parent theme, Hello Elementor, and our child theme, and the results were consistent across both themes.

 

These findings suggest that there might be a specific conflict involving Elementor and WooCommerce Variation Swatches when used together on our site. Any insights or suggestions you could offer to resolve this issue would be greatly appreciated.

 

Looking forward to your advice on how we might proceed to resolve this compatibility issue.

 

Thank you again for your assistance.

 

Best regards,

 

Com os melhores cumprimentos

José Barros

Hakik Zaman

Hi José,

You are using “Elementor” to design your page.

One additional jQuery CDN is loading from one of your sources- https://paste.pics/QSYA0

jQuery is a default library of WordPress Core- https://developer.wordpress.org/reference/functions/wp_enqueue_script/#default-scripts-and-js-libraries-included-and-registered-by-wordpress

But one of your widgets (HTML Widget) or additional code forces the extra jQuery CDN and it generates the error.

Please check your HTML widgets and theme’s functions.php to find the additional jQuery CDN.

Thanks

José Barros

Hello,

Thank you so much. It helped a lot!

Best regards.