Last active
September 24, 2024 17:55
-
-
Save claudiosanches/6f91ad228c2176b986b2 to your computer and use it in GitHub Desktop.
WooCommerce - Change ajax variation threshold
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
Thank-you for this. I was wondering why Add To Cart wasn't showing up on a product with 50 variations.