Hello,
I have a small issue with woocommerce on the same website.
I have a product with variations. All of them are virtual. I would like to hide all options from choosing what are not in variations. I have found only code how to hide variations what are out of stock. But virtual variations are not never out of stock so I cannot hide them.
Example:
1st options: S | M | XL
2nd options: red | blue
When I have variations and these variation include only one type with ‘red’ f.e. red M but others are blue S, blue M, blue XL, so I need to be able hide possibility to choose options red S and red XL. Customer are able now choose them but not add it into the cart. I need to hide them from choose option. F.e. if customer choose option red then the customer will not see possibility of size S and XL to be able to choose.
Do you have an idea about some code into the functions what could help? All codes what I tried didn’t help.
Thank you,
Lukas