File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
app/code/Magento/Quote/Model/Quote/Plugin Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 7
7
8
8
namespace Magento \Quote \Model \Quote \Plugin ;
9
9
10
+ use Magento \Framework \Exception \NoSuchEntityException ;
10
11
use Magento \Quote \Model \Quote ;
11
12
use Magento \Store \Model \StoreManagerInterface ;
12
13
@@ -36,13 +37,14 @@ public function __construct(
36
37
* @param Quote $result
37
38
* @return Quote
38
39
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
40
+ * @throws NoSuchEntityException
39
41
*/
40
42
public function afterLoadByIdWithoutStore (Quote $ subject , Quote $ result ): Quote
41
43
{
42
- $ storeId = $ this ->storeManager ->getStore ()
43
- -> getId () ?: $ this -> storeManager -> getDefaultStoreView ()
44
- -> getId ( );
45
- $ result -> setStoreId ( $ storeId );
44
+ $ storeId = $ this ->storeManager ->getStore ()-> getId ();
45
+ if ( $ storeId ) {
46
+ $ result -> setStoreId ( $ storeId );
47
+ }
46
48
47
49
return $ result ;
48
50
}
You can’t perform that action at this time.
0 commit comments