Skip to content

Commit 145535b

Browse files
authored
ENGCOM-5416: Correct SendFriend Visibility Check #760
2 parents c20732c + 150fe7a commit 145535b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app/code/Magento/SendFriendGraphQl/Model/Provider/GetVisibleProduct.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@ public function execute(int $productId): ProductInterface
4949
$product = $this->productRepository->getById($productId);
5050

5151
if (!in_array(
52-
$product->getVisibility(),
53-
$this->visibility->getVisibleInCatalogIds()
52+
(int) $product->getVisibility(),
53+
$this->visibility->getVisibleInSiteIds(),
54+
true
5455
)) {
5556
throw new GraphQlNoSuchEntityException(
5657
__("The product that was requested doesn't exist. Verify the product and try again.")

0 commit comments

Comments
 (0)