Skip to content

Instantly share code, notes, and snippets.

@claudiosanches
Last active November 22, 2023 06:17
Show Gist options
  • Star 16 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save claudiosanches/6f91ad228c2176b986b2 to your computer and use it in GitHub Desktop.
Save claudiosanches/6f91ad228c2176b986b2 to your computer and use it in GitHub Desktop.
WooCommerce - Change ajax variation threshold
function custom_wc_ajax_variation_threshold( $qty, $product ) {
return 10;
}
add_filter( 'woocommerce_ajax_variation_threshold', 'custom_wc_ajax_variation_threshold', 10, 2 );
@impetudigital
Copy link

It worked correctly for 100 variations.
To be cautious and not to touch the "functions.php" file, I inserted this code through the WP Code plugin.

Thank you very much!

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