Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Increase the number of variations loaded in the WooCommerce front end for dynamic filtering of available variations in the drop down lists.
<?php //only copy this line if needed
* Function filters the threshold for the amount of variables to load in the front end.
* @see
* @param int $threshold Default of 30
* @return int 100 The new threshold.
function lets_increase_the_variation_threshold( $threshold ) {
return 100;
add_filter( 'woocommerce_ajax_variation_threshold', 'lets_increase_the_variation_threshold' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment