Recent versions of WooCommerce (since 2.3.0?) has a woocommerce_variation_is_active filter which lets you disable ("grey out") e.g. out-of-stock items from the variations dropdown: https://github.com/woothemes/woocommerce/issues/5661
Therefore, to disable the corresponding radiobuttons, the check_available_attributes event handler needs to check each variation's .variation_is_active property in all cases, not only when there are multiple attributes.
Hmm.. This triggered a bug that disables any variation value that's not a number or a lowercase string. I submitted a new pull request with a suggested fix.
Recent versions of WooCommerce (since 2.3.0?) has a
woocommerce_variation_is_active
filter which lets you disable ("grey out") e.g. out-of-stock items from the variations dropdown: https://github.com/woothemes/woocommerce/issues/5661Therefore, to disable the corresponding radiobuttons, the
check_available_attributes
event handler needs to check each variation's.variation_is_active
property in all cases, not only when there are multiple attributes.