File tree Expand file tree Collapse file tree 3 files changed +18
-8
lines changed Expand file tree Collapse file tree 3 files changed +18
-8
lines changed Original file line number Diff line number Diff line change 1
1
<?php
2
- /**
3
- * Copyright 2024 Adobe
2
+ /************************************************************************
3
+ * Copyright 2025 Adobe
4
4
* All Rights Reserved.
5
+ *
6
+ * NOTICE: All information contained herein is, and remains
7
+ * the property of Adobe and its suppliers, if any. The intellectual
8
+ * and technical concepts contained herein are proprietary to Adobe
9
+ * and its suppliers and are protected by all applicable intellectual
10
+ * property laws, including trade secret and copyright laws.
11
+ * Dissemination of this information or reproduction of this material
12
+ * is strictly forbidden unless prior written permission is obtained
13
+ * from Adobe.
14
+ * ***********************************************************************
5
15
*/
6
16
7
17
declare (strict_types=1 );
@@ -45,10 +55,10 @@ public function beforeSave(
45
55
CartRepositoryInterface $ cartRepository ,
46
56
CartInterface $ quote
47
57
): void {
48
- if ($ orderId = $ quote ->getOrigOrderId ()) {
49
- $ order = $ this ->orderRepository ->get ($ orderId );
58
+ if ($ quote -> getOrigOrderId () && $ quote ->getCustomerId ()) {
59
+ $ order = $ this ->orderRepository ->get (( int ) $ quote -> getOrigOrderId () );
50
60
$ orderCustomer = (int )$ order ->getCustomerId ();
51
- if ($ quote ->getCustomerId () !== $ orderCustomer ) {
61
+ if (( int ) $ quote ->getCustomerId () !== $ orderCustomer ) {
52
62
throw new NoSuchEntityException (__ ('Please check input parameters. ' ));
53
63
}
54
64
}
Original file line number Diff line number Diff line change 184
184
</argument >
185
185
</arguments >
186
186
</type >
187
+ <type name =" Magento\Quote\Api\CartRepositoryInterface" >
188
+ <plugin name =" quoteValidateOrderId" type =" Magento\Quote\Plugin\ValidateQuoteOrigOrder" />
189
+ </type >
187
190
</config >
Original file line number Diff line number Diff line change 20
20
<plugin name =" updateQuoteStoreId" type =" Magento\Quote\Model\Quote\Plugin\UpdateQuoteStoreId" />
21
21
<plugin name =" validateQuoteAddress" type =" Magento\Quote\Plugin\QuoteAddress" />
22
22
</type >
23
- <type name =" Magento\Quote\Api\CartRepositoryInterface" >
24
- <plugin name =" quoteValidateOrderId" type =" Magento\Quote\Plugin\ValidateQuoteOrigOrder" />
25
- </type >
26
23
<type name =" Magento\Quote\Model\QuoteValidator" >
27
24
<plugin name =" error_redirect_processor" type =" Magento\Quote\Plugin\Webapi\Model\ErrorRedirectProcessor" />
28
25
</type >
You can’t perform that action at this time.
0 commit comments