File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed
app/code/Magento/Quote/Plugin Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -25,17 +25,10 @@ class ValidateQuoteOrigOrder
25
25
private $ orderRepository ;
26
26
27
27
/**
28
- * @var RestRequest $request
29
- */
30
- private $ request ;
31
-
32
- /**
33
- * @param RestRequest $request
34
28
* @param OrderRepositoryInterface $orderRepository
35
29
*/
36
- public function __construct (RestRequest $ request , OrderRepositoryInterface $ orderRepository )
30
+ public function __construct (OrderRepositoryInterface $ orderRepository )
37
31
{
38
- $ this ->request = $ request ;
39
32
$ this ->orderRepository = $ orderRepository ;
40
33
}
41
34
@@ -52,9 +45,7 @@ public function beforeSave(
52
45
CartRepositoryInterface $ cartRepository ,
53
46
CartInterface $ quote
54
47
): 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 ()) {
58
49
$ order = $ this ->orderRepository ->get ($ orderId );
59
50
$ orderCustomer = (int )$ order ->getCustomerId ();
60
51
if ($ quote ->getCustomerId () !== $ orderCustomer ) {
You can’t perform that action at this time.
0 commit comments