File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -54,13 +54,22 @@ public function getLoadedProducts(): array
5454 $ loadedProductSkus = array_diff ($ this ->productSkus , array_keys ($ this ->loadedProducts ));
5555 if (count ($ loadedProductSkus ) > 0 ) {
5656 foreach ($ this ->loadProductsBySkus ($ loadedProductSkus ) as $ product ) {
57- $ this ->loadedProducts [ $ product -> getSku ()] = $ product ;
57+ $ this ->addProductToLoadedProducts ( $ product) ;
5858 }
5959 }
6060
6161 return $ this ->loadedProducts ;
6262 }
6363
64+ /**
65+ * @param ProductInterface $product
66+ * @return void
67+ */
68+ public function addProductToLoadedProducts (ProductInterface $ product ): void
69+ {
70+ $ this ->loadedProducts [$ product ->getSku ()] = $ product ;
71+ }
72+
6473 /**
6574 * @param string $sku
6675 * @return ProductInterface
You can’t perform that action at this time.
0 commit comments