I would like a standard message to appear when a customer selects a product (including product variant) that has no stock. I am allowing products to continue to be sold when they are out of stock, but would like to display the standard message to let the customer know that delivery will take longer (because it is made-to-order).
Hi @LitExtension - thanks so much for taking the time to reply. Is there a way of making this work when a different variant is selected? Using the code you provided, the first variant when I visit the product page shows the message (because stock is zero but variant is set to 'keep on selling'). But if I choose another variant which is in stock, the message still displays.