Skip to content

Commit e39710a

Browse files
committed
Merge branch 'ACP2E-3505' of https://github.com/adobe-commerce-tier-4/magento2ce into PR-Tier4-VK-2025-01-09
2 parents 37930d2 + b934304 commit e39710a

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

app/code/Magento/RelatedProductGraphQl/Model/Resolver/Batch/AbstractLikedProducts.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,9 @@ private function findRelations(
124124
$relatedProducts = [];
125125
/** @var ProductInterface $item */
126126
foreach ($relatedSearchResult->getItems() as $item) {
127-
$relatedProducts[$item->getId()] = $item;
127+
if ($item->isAvailable()) {
128+
$relatedProducts[$item->getId()] = $item;
129+
}
128130
}
129131

130132
//Matching products with related products.

dev/tests/api-functional/testsuite/Magento/GraphQl/RelatedProduct/GetRelatedProductsTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2019 Adobe
4+
* All Rights Reserved.
55
*/
66
declare(strict_types=1);
77

0 commit comments

Comments
 (0)