storesInStoreByVariations[$forceVariationId] ?? []; } elseif ($product instanceof \Variation) { $storesInStore = $product->storesInStoreByVariations[$product->variationId] ?? []; } else { $storesInStore = $product->storesInStore ?? []; } $stores = []; foreach ($storesInStore as $idStore => $store) { $stores[] = new PosStoreItem($idStore, $store['name'], $store['in_store']); } return new PosStoreItemCollection($stores); } }