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
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 ) {
You can’t perform that action at this time.
0 commit comments