Fix WooCommerce Limit on Variations (Front End)
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
/** | |
* Fix for issue where too many variations causes the front end to not pre-load | |
* all variations and rely on AJAX. | |
*/ | |
function custom_wc_ajax_variation_threshold( $qty, $product ) | |
{ | |
return 400; | |
} | |
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