Skip to content

Commit 5e9f148

Browse files
committed
Use forcereload instead of clone
1 parent 58036f0 commit 5e9f148

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/code/Magento/QuoteGraphQl/Model/Cart/AddSimpleProductToCart.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function execute(Quote $cart, array $cartItemData): void
5555
$sku = $this->extractSku($cartItemData);
5656

5757
try {
58-
$product = clone $this->productRepository->get($sku);
58+
$product = $this->productRepository->get($sku, false, null, true);
5959
} catch (NoSuchEntityException $e) {
6060
throw new GraphQlNoSuchEntityException(__('Could not find a product with SKU "%sku"', ['sku' => $sku]));
6161
}

0 commit comments

Comments
 (0)