Skip to content

How to Show Out of Stock Options for Configurable Products Visual Swatch in Magento 2.4.4

I want to show out of stock swatch options on the configurable product even if the options is out of stock and the main configurable product is also out of stock.

I want to show that swatch options with disable functionality.
So for example I have a T-shirt configurable product, so I have added a green single product and an orange single product as Associated products. The orange product is out of stock, I still want it to be displayed in the swatch option so customers know that there’s an orange option but it should be out of stock so the customer can’t order.