Over 30 variations bug

Posted about 5 years by Stewart Fernandez

Post a topic
Answered
S
Stewart Fernandez

HI


If i make over 30 variations(3 pages) it shows all options and ignores the limits i set for that item


I have 3 products each with there own sizes so if you pick one type then you only see 6 sizes that are only for the product you picked, this works fine until a add over 30 than it shows all sizes for all products.


Any way to fix this??

0 Votes

S

Stewart Fernandez posted about 5 years Best Answer

Ah seems its a woocommerce problem


Added this to the child themes functions.php


<?php

function ww_ajax_variation_threshold( $default, $product ) {

 return 50; // increase this number if needed

}

add_filter( 'woocommerce_ajax_variation_threshold', 'ww_ajax_variation_threshold', 10, 2 );

?>


Change the 10 to the amount of variations you need

0 Votes


2 Comments

Sorted by
S

Suma posted almost 3 years

hi, Thanks. YOU ROCK!! 

0 Votes

S

Stewart Fernandez posted about 5 years Answer

Ah seems its a woocommerce problem


Added this to the child themes functions.php


<?php

function ww_ajax_variation_threshold( $default, $product ) {

 return 50; // increase this number if needed

}

add_filter( 'woocommerce_ajax_variation_threshold', 'ww_ajax_variation_threshold', 10, 2 );

?>


Change the 10 to the amount of variations you need

0 Votes

Login or Sign up to post a comment