Display a Sold out greyed button if all variations are out of stock in Woocommerce
问题 I am looking for a solution to a problem I have... I have products in Woocommerce, with variations. If ALL variations are out of stock, I want to change the Add to Cart button text to say "Sold out" and edit the CSS of the button also (change it's color) BEFORE a variation is selected in the dropdown... So here's a scenario: I goto a variable product single page. The product has 4 variations: CURRENTLY: The "add to cart" button displays (greyed out) and can be clicked before a variation is