Skip to content

Instantly share code, notes, and snippets.

@SirDarcanos
Created September 8, 2015 08:27
Show Gist options
  • Save SirDarcanos/231ab74fe5c3e8b2a157 to your computer and use it in GitHub Desktop.
Save SirDarcanos/231ab74fe5c3e8b2a157 to your computer and use it in GitHub Desktop.
This is not a bug, it's the expected behavior. There is a cut off at **20 variations**. More explanation on this is done here: https://woocommerce.wordpress.com/2015/07/13/improving-the-variations-interface-in-2-4/.
In the frontend, if a variable product has more than 20 variations, the data will be loaded via AJAX rather than handled inline.
It is possible to change this quantity using the `woocommerce_ajax_variation_threshold` filter. After 20 by default, it starts checking with the database after the selections are made.
Add this code in the file `functions.php` located in your theme folder in `wp-content/themes/your-theme-name/`:
https://gist.github.com/SiR-DanieL/2e178ed6f0d9a58e9959
If you want, you can also edit the file directly from the dashboard in WordPress. To do so, navigate to **Appearance > Editor** and find the file **Theme Functions (functions.php)** in the list on the right of the page, like in this screenshot:
![](http://cld.wthms.co/12U9T+)
If you file ends with the sign `?>` be sure to add the code one line before this sign.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment