Skip to content

Instantly share code, notes, and snippets.

@ajmorris
Forked from claudiosanches/functions.php
Created April 18, 2018 17:33
Show Gist options
  • Save ajmorris/2f33a9e581d78f0d74d43214b292458c to your computer and use it in GitHub Desktop.
Save ajmorris/2f33a9e581d78f0d74d43214b292458c 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 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment