This article provides a patch for the known Adobe Commerce 2.2.2 issue related to the configurable product swatches being out of stock not displayed as crossed out on the storefront.
When you have a configurable product, and for a certain combination of options, the related simple product is out of stock, the swatch is still available and can be selected on the storefront.
Steps to reproduce:
The red, M swatch has a red slash and cannot be selected.
The red, M swatch can be selected.
The patch is attached to this article. To download it, scroll down to the end of the article and click the file name or click the following link:
The patch was created for:
The patch is also compatible (but might not solve the issue) with the following Adobe Commerce versions and editions:
See How to apply a composer patch provided by Adobe Commerce for instructions.