Model/CheckoutSessionManagement.php
/**
     * In some particular cases an error occurs in Magento where an order with the same quoteId
     * is duplicated in a very short time difference.
     * This method checks if there is already an order created for that particular Quote.
     * https://github.com/magento/magento2/issues/13952
     * @param Quote $quote
     * @return bool
     */
In some particular cases an error occurs in Magento where an order with the same quoteId
is duplicated in a very short time difference.
This method checks if there is already an order created for that particular Quote.
In some particular cases an error occurs in Magento where an order with the same quoteId is duplicated in a very short time difference . This method checks if there is already an order created for that particular Quote .
protected function canSubmitQuote($quote)
    {
        if (!$quote->getIsActive()) {
            return false;
        }
        $orderCollection = $this->orderCollectionFactory->create()
            ->addFieldToSelect('increment_id')
            ->addFieldToFilter('quote_id', ['eq' => $quote->getId()]);
        return ($orderCollection->count() == 0);
    }
protected function canSubmitQuote ( $ quote ) { if ( ! $ quote -> getIsActive ( ) ) { return false ; } $ orderCollection = $ this -> orderCollectionFactory -> create ( ) -> addFieldToSelect ( 'increment_id' ) -> addFieldToFilter ( 'quote_id' , [ 'eq' => $ quote -> getId ( ) ] ) ; return ( $ orderCollection -> count ( ) == 0 ) ; }
In some particular cases an error occurs in Magento where an order with the same quoteId
 is duplicated in a very short time difference.
In some particular cases an error occurs in Magento where an order with the same quoteId is duplicated in a very short time difference .