diff --git a/vendor/magento/module-swatches/view/base/web/js/swatch-renderer.js b/vendor/magento/module-swatches/view/base/web/js/swatch-renderer.js index 6782a87b02a..fdf76406f77 100644 --- a/vendor/magento/module-swatches/view/base/web/js/swatch-renderer.js +++ b/vendor/magento/module-swatches/view/base/web/js/swatch-renderer.js @@ -463,12 +463,17 @@ define([ // Aggregate options array to hash (key => value) $.each(item.options, function () { if (this.products.length > 0) { + let salableProducts = this.products; + + if ($widget.options.jsonConfig.canDisplayShowOutOfStockStatus) { + salableProducts = $widget.options.jsonConfig.salable[item.id][this.id]; + } $widget.optionsMap[item.id][this.id] = { price: parseInt( $widget.options.jsonConfig.optionPrices[this.products[0]].finalPrice.amount, 10 ), - products: this.products + products: salableProducts }; } });