I'm trying to get quote on checkout and this exception is thrown in
vendor\magento\module-checkout\Model\Session.php:241
exception.log
Message: Infinite loop detected, review the trace for the looping path
{"exception":"[object] (Exception(code: 0): Report ID: webapi-
6e4533bg2n381; Message: Infinite loop detected, review the trace for the
looping path at /public_html/vendor/magento/framework/Webapi
/ErrorProcessor.php:208, LogicException(code: 0): Infinite loop detected,
review the trace for the looping path at /public_html/vendor/magento
/module-checkout/Model/Session.php:241)"} []
The problem is in overridden \Magento\Tax\Model\Config
getShippingTaxClass()
where I use
$cart = $objectManager->get('\Magento\Checkout\Model\Cart');
$quote = $cart->getQuote();
$itemsCollection = $quote->getItemsCollection();
and this triggers the exception. There is no loop around it.
What would be to correct way of getting cart items in 2.3.4?