Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sisaacrussell/61cf24946672ec1eb7728e55939793e8 to your computer and use it in GitHub Desktop.
Save sisaacrussell/61cf24946672ec1eb7728e55939793e8 to your computer and use it in GitHub Desktop.
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 https://woocommerce.wordpress.com/2015/07/13/improving-the-variations-interface-in-2-4/
*
* @return int 100 The new threshold.
*/
add_filter( 'woocommerce_ajax_variation_threshold', function() { return 100; } );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment