Hi Vishal,
Thanks so much for looking into this, and, yes, I understand how this could be difficult to implement because of how different attribute combinations are possible.
Forgive me if this isn’t helpful, but I do see that WooCommerce added a ‘woocommerce_hide_invisible_variations’ filter in the get_available_variations() function inside class-wc-product-variable.php. Given that it does work with the default select menus, I’m wondering if they’re using that filter to do so?
The site I’m working on has a few variations that are only available *sometimes*. They don’t want to have to remove the variations because of the data that they’ve added, but they also don’t want them to surface on the front-end as “out of stock.”
In one case, https://prnt.sc/uzb7mw, the “EHR-1209” size is disabled across the board. So, the proposed solution of hiding at the time of selection wouldn’t work because it should always be hidden.
I know this is a frustrating one, thanks again for looking into it!
Best,
Jeremy