Helper/Cart.php
protected function createImmutableQuote($quote)
    {
        if (!$quote->getBoltParentQuoteId()) {
            $quote->setBoltParentQuoteId($quote->getId());
            $this->quoteResourceSave($quote);
        }
        /** @var Quote $immutableQuote */
        $immutableQuote = $this->quoteFactory->create();

        $this->replicateQuoteData($quote, $immutableQuote);

        return $immutableQuote;
    }
protected function createImmutableQuote($quote)
    {
        if (!$quote->getBoltParentQuoteId()) {
            $quote->setBoltParentQuoteId($quote->getId());
            $this->quoteResourceSave($quote);
        }
        /** @var Quote $immutableQuote */
        $immutableQuote = $this->quoteFactory->create();

        $this->replicateQuoteData($quote, $immutableQuote);

        return $immutableQuote;
    }
protected function createImmutableQuote ( $ quote ) { if ( ! $ quote -> getBoltParentQuoteId ( ) ) { $ quote -> setBoltParentQuoteId ( $ quote -> getId ( ) ) ; $ this -> quoteResourceSave ( $ quote ) ; } /** @var Quote $immutableQuote */ $ immutableQuote = $ this -> quoteFactory -> create ( ) ; $ this -> replicateQuoteData ( $ quote , $ immutableQuote ) ; return $ immutableQuote ; }
Create an immutable quote.
Set the BoltParentQuoteId to the parent quote, if not set already,
so it can be replicated to immutable quote in replicateQuoteData.

@param Quote $quote
@throws \Magento\Framework\Exception\AlreadyExistsException
@throws \Zend_Validate_Exception
Create an immutable quote . Set the BoltParentQuoteId to the parent quote if not set already so it can be replicated to immutable quote in replicateQuoteData .