Skip to content

Instantly share code, notes, and snippets.

@jessepearson
Last active March 29, 2022 17:46
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save jessepearson/ae21721f4d75ea8d2c72c138a3aa25d7 to your computer and use it in GitHub Desktop.
Save jessepearson/ae21721f4d75ea8d2c72c138a3aa25d7 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; } );
@SC36DC
Copy link

SC36DC commented Aug 26, 2019

Thank you so much for this, this worked perfectly!!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment