JS Bug preventing switching variations
-
Hi there,
let me report my findings debugging our page after the variation switches stopped working. I downgraded all the plugins that could have impacted our variation switches, but i got no version to work.
I switched to storefront theme, which did not help either.
What was noticable, all pictures and 3D spinners loaded fine, when I configured the plugin to load all product data. But if only the current variation should be shown, clicking the variation switches did not change the pictures.
It turned out there is a little bug (sirv 6.8.3) in the wp-sirv-woo.js:
function filterByGroups(id = ”) {
if (!!!$instance) return;
if (!!id && inArray(id, existingIds)) {
id = id + ”;
$instance.switchGroup(id);
} else {
…Move the bold marked part above the enclosing if statement. The type casting is simply after it should appear:
function filterByGroups(id = ”) {
if (!!!$instance) return;
id = id + ”;
if (!!id && inArray(id, existingIds)) {
$instance.switchGroup(id);
} else {
…Hope this solves issues for some people…
- The topic ‘JS Bug preventing switching variations’ is closed to new replies.