How to display out of stock variations as unavailable in WooCommerce

Update

I’ve created a plugin that will allow you to disable any out of stock variations and even include custom ‘sold out’ text. You can download WooCommerce Better Variations here.

This is a quick solution to how to disable out of stock variations in variation select fields. By default, WooCommerce doesn’t grey out any variations that are out of stock – it allows the user to select the variation first, then lets them know it’s out of stock. Read more