Hi,
I’m sorry to say that, We have tried many solution to do this, but it seems impossible. I can give you an example case
#Product 1 has attribute X, M, L and Black, Blue, Red if this product only has X – Black is in stock –> We can check and it will work
#Product 2 has the same attribute with #1 but this product only has X – Black is out of stock (Another case X – Red, X – Blue, M – Black, L – Black is in stock) –> We can’t check it because it based on the data of WC –> this case will not work.
Hope you understand.