Skip to content

Commit 6dfe212

Browse files
MAGETWO-69028: no need to create customer once u got the quote object #9574
2 parents 664766e + 43a0ef5 commit 6dfe212

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

app/code/Magento/Quote/Model/QuoteManagement.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -301,11 +301,10 @@ protected function createAnonymousCart($storeId)
301301
*/
302302
protected function createCustomerCart($customerId, $storeId)
303303
{
304-
$customer = $this->customerRepository->getById($customerId);
305-
306304
try {
307305
$quote = $this->quoteRepository->getActiveForCustomer($customerId);
308306
} catch (\Magento\Framework\Exception\NoSuchEntityException $e) {
307+
$customer = $this->customerRepository->getById($customerId);
309308
/** @var \Magento\Quote\Model\Quote $quote */
310309
$quote = $this->quoteFactory->create();
311310
$quote->setStoreId($storeId);

0 commit comments

Comments
 (0)