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 11<?php
2- /**
3- * Copyright 2024 Adobe
2+ /************************************************************************
3+ * Copyright 2025 Adobe
44 * 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+ * ***********************************************************************
515 */
616
717declare (strict_types=1 );
@@ -45,10 +55,10 @@ public function beforeSave(
4555 CartRepositoryInterface $ cartRepository ,
4656 CartInterface $ quote
4757 ): 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 () );
5060 $ orderCustomer = (int )$ order ->getCustomerId ();
51- if ($ quote ->getCustomerId () !== $ orderCustomer ) {
61+ if (( int ) $ quote ->getCustomerId () !== $ orderCustomer ) {
5262 throw new NoSuchEntityException (__ ('Please check input parameters. ' ));
5363 }
5464 }
Original file line number Diff line number Diff line change 184184 </argument >
185185 </arguments >
186186 </type >
187+ <type name =" Magento\Quote\Api\CartRepositoryInterface" >
188+ <plugin name =" quoteValidateOrderId" type =" Magento\Quote\Plugin\ValidateQuoteOrigOrder" />
189+ </type >
187190</config >
Original file line number Diff line number Diff line change 2020 <plugin name =" updateQuoteStoreId" type =" Magento\Quote\Model\Quote\Plugin\UpdateQuoteStoreId" />
2121 <plugin name =" validateQuoteAddress" type =" Magento\Quote\Plugin\QuoteAddress" />
2222 </type >
23- <type name =" Magento\Quote\Api\CartRepositoryInterface" >
24- <plugin name =" quoteValidateOrderId" type =" Magento\Quote\Plugin\ValidateQuoteOrigOrder" />
25- </type >
2623 <type name =" Magento\Quote\Model\QuoteValidator" >
2724 <plugin name =" error_redirect_processor" type =" Magento\Quote\Plugin\Webapi\Model\ErrorRedirectProcessor" />
2825 </type >
You can’t perform that action at this time.
0 commit comments