# Raise the Variation Limit for Instant Price Updates

> Increases the number of variations WooCommerce loads with the page (30 by default), so large variable products update price and stock instantly and hide unavailable combinations.

- Type: PHP
- Runs: Run everywhere
- Category: [WooCommerce](https://wpide.com/library/category/woocommerce/)
- Requires: WooCommerce
- Tags: woocommerce, variations, performance
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/woo-variation-ajax-threshold/

## Code

```php
add_filter( 'woocommerce_ajax_variation_threshold', function () {
    return 100; // Maximum variations loaded with the page.
} );
```

## Notes

Very large values make product pages heavier. 100 to 150 suits most stores.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Raise the Variation Limit for Instant Price Updates" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
