Home / Forums / WoodMart support forum / WoodMart forcing data-threshold=”1″ breaks Variation Swatches plugin
Home › Forums › WoodMart support forum › WoodMart forcing data-threshold=”1″ breaks Variation Swatches plugin
WoodMart forcing data-threshold=”1″ breaks Variation Swatches plugin
- This topic has 2 replies, 2 voices, and was last updated 1 week, 1 day ago by
Artem Temos.
-
AuthorPosts
-
October 28, 2025 at 4:36 am #693075
marcosrjdesouzaParticipantHello WoodMart Support Team,
We are experiencing a critical conflict on our site involving your theme and the “Variation Swatches for WooCommerce” plugin (by GetWooPlugins).
The Problem: On highly complex variable products (one product has 359 variations), the variation swatches do not work. Instead of showing the “Unavailable” or “X” styles, the page shows the default WooCommerce error message.
Here is the BROKEN product page (359 variations): https://wheat-crow-333766.hostingersite.com/produto/innovcable-cabo-de-controle-bf-fa-nbr-7289/
To replicate the error: Select “42” (Nº de condutores), “10,00” (Seção (mm²)), and “Sim” (Proteção verde-terra?). This will trigger the error.
For comparison, here is a simple product that works CORRECTLY: https://wheat-crow-333766.hostingersite.com/produto/innovcable-pvc-jb-ob/
On this “working” page, the swatches show an “X” as expected. This proves the issue is isolated to complex products.
The Root Cause (We have debugged this): Your theme is programmatically writing data-threshold=”1″ directly into the HTML of the <form class=”variations_form”> element for the broken product.
The woo-variation-swatches plugin script reads this “1”, sees that the product’s total variations (359) is greater than the threshold (1), and disables itself for performance.
What We Have Tried (and failed):
Our console is 100% clean (we fixed all jQuery/LiteSpeed/Side Cart errors).
We tried forcing the woo-variation-swatches script to load using your Performance settings (“Scripts always load”). This works, but the script still reads data-threshold=”1″ and disables itself.
We tried using a high-priority MutationObserver (injected via PHP into wp_head at priority 1) to change data-threshold=”1″ to data-threshold=”600″. Your theme’s script (woodmart-theme.js) wins this “race condition” and changes the value back to “1”.
Our Question: How can we stop the WoodMart theme from writing data-threshold=”1″ on complex products? What is the correct PHP filter or theme setting to change this threshold value?
Thank you.
October 28, 2025 at 6:12 am #693078
marcosrjdesouzaParticipantHello, I have created an account.
October 28, 2025 at 9:50 am #693100
Artem TemosKeymasterHello
Thank you for your detailed explanation. Unfortunately, the “Variation Swatches for WooCommerce” plugin by GetWooPlugins is not compatible with the WoodMart theme due to the way our theme handles the data-threshold attribute for variable products. This behavior is hardcoded in the theme and cannot be modified via a PHP filter or theme setting at this time.
We recommend using our theme’s swatches functionality in this case.
If you need further assistance or recommendations, please let us know.
Regards
-
AuthorPosts
- You must be logged in to create new topics. Login / Register