Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mitchellkrogza/f404269a82cdc7e012b2b3de3a5eb10a to your computer and use it in GitHub Desktop.
Save mitchellkrogza/f404269a82cdc7e012b2b3de3a5eb10a to your computer and use it in GitHub Desktop.
Fix WooCommerce Limit on Variations (Front End)
/**
* 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