In Woocommerce, I'm trying to hide add to cart button for variations with a specific selected value for one of attributes. There are two attributes for each variation (pa_color
and pa_size
)
For example for a variable product, we have these options:
1) Red - XL
2) Red - XXL
3) Blue - M
4) Blue - XL
I want to hide add to cart button for XL
so users could not add options having XL to cart (1 and 4 in this example)
P.S:
We don't want to disable the variation, so variation image could show up by selecting this option, So deactivating the variation or removing the price and.. isn't the solution for us.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…