Skip to content

Instantly share code, notes, and snippets.

@jrick1229
Last active February 18, 2022 14:41
Show Gist options
  • Save jrick1229/abc143604ee122fd3971ec79e56783b8 to your computer and use it in GitHub Desktop.
Save jrick1229/abc143604ee122fd3971ec79e56783b8 to your computer and use it in GitHub Desktop.
Increase variation threshold from switching to AJAX to 500
<?php
function wc_increase_variation_threshold() {
return 500;
}
add_filter( 'woocommerce_ajax_variation_threshold', 'wc_increase_variation_threshold' );
@jrick1229
Copy link
Author

In anonymous function form:

add_filter( 'woocommerce_ajax_variation_threshold', function() { return 500; } );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment