WooCommerce: can't add product variations
Your attributes are set up, but variations won't add, the button does nothing, or they disappear after saving. Before you start disabling plugins on a live shop, try this.
1. Check the basics
- The product type must be Variable product.
- The attribute must have Used for variations ticked and be saved with Save attributes. Only then can you create variations.
2. Look at the browser console
Open the product editor, press F12 and watch the Console and Network tabs while you add a variation. A red JavaScript error usually points to the plugin or theme it comes from. A request to admin-ajax.php failing with 403 often means a security plugin or the host's firewall; 500 means a PHP error.
3. Find the culprit without risk
The Health Check & Troubleshooting plugin has a troubleshooting mode that disables plugins and switches to a default theme only for you. Shop visitors see nothing. Then you enable plugins one by one and see which one breaks variations. Start with plugins that touch products (B2B, customer group pricing), the theme, and cache or minification plugins.
4. Lots of variations at once
If saving looks successful but nothing is saved, a low PHP max_input_vars limit is a common cause. Your host can raise it.