Created
January 27, 2016 09:44
-
-
Save tronsha/0493d4865679488d493d to your computer and use it in GitHub Desktop.
woocommerce: fix "out of stock" message, if more than 30 variants are existing.
This file contains hidden or 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
<?php | |
function custom_wc_ajax_variation_threshold( $qty, $product ) { | |
return sizeof( $product->get_children() ); | |
} | |
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