Skip to content

Commit f2a6358

Browse files
committed
AC-12582: User cart issue fix
1 parent b3d2c59 commit f2a6358

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

app/code/Magento/Quote/Plugin/ValidateQuoteOrigOrder.php

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,10 @@ class ValidateQuoteOrigOrder
2525
private $orderRepository;
2626

2727
/**
28-
* @var RestRequest $request
29-
*/
30-
private $request;
31-
32-
/**
33-
* @param RestRequest $request
3428
* @param OrderRepositoryInterface $orderRepository
3529
*/
36-
public function __construct(RestRequest $request, OrderRepositoryInterface $orderRepository)
30+
public function __construct(OrderRepositoryInterface $orderRepository)
3731
{
38-
$this->request = $request;
3932
$this->orderRepository = $orderRepository;
4033
}
4134

@@ -52,9 +45,8 @@ public function beforeSave(
5245
CartRepositoryInterface $cartRepository,
5346
CartInterface $quote
5447
): void {
55-
$params = $this->request->getBodyParams();
56-
if (!empty($params) && isset($params['quote']['orig_order_id'])) {
57-
$orderId = $params['quote']['orig_order_id'];
48+
if ($quote->getOrigOrderId()) {
49+
$orderId = $quote->getOrigOrderId();
5850
$order = $this->orderRepository->get($orderId);
5951
$orderCustomer = (int)$order->getCustomerId();
6052
if ($quote->getCustomerId() !== $orderCustomer) {

0 commit comments

Comments
 (0)