Skip to content

Commit b179647

Browse files
Merge branch 'AC-12582' into cia-2.4.8-beta2-develop-bugfix-10072024
2 parents 482b6c7 + e510ba1 commit b179647

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

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

Lines changed: 2 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,7 @@ 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 ($orderId = $quote->getOrigOrderId()) {
5849
$order = $this->orderRepository->get($orderId);
5950
$orderCustomer = (int)$order->getCustomerId();
6051
if ($quote->getCustomerId() !== $orderCustomer) {

0 commit comments

Comments
 (0)