Model/Api/ShippingMethods.php
private function resetShippingCalculationIfNeeded($shippingAddress)
    {
        if ($this->configHelper->getResetShippingCalculation()) {
            $shippingAddress->removeAllShippingRates();
            $shippingAddress->setCollectShippingRates(true);
        }
    }
private function resetShippingCalculationIfNeeded($shippingAddress)
    {
        if ($this->configHelper->getResetShippingCalculation()) {
            $shippingAddress->removeAllShippingRates();
            $shippingAddress->setCollectShippingRates(true);
        }
    }
private function resetShippingCalculationIfNeeded ( $ shippingAddress ) { if ( $ this -> configHelper -> getResetShippingCalculation ( ) ) { $ shippingAddress -> removeAllShippingRates ( ) ; $ shippingAddress -> setCollectShippingRates ( true ) ; } }
Reset shipping calculation

On some store setups shipping prices are conditionally changed
depending on some custom logic. If it is done as a plugin for
some method in the Magento shipping flow, then that method
may be (indirectly) called from our Shipping And Tax flow more
than once, resulting in wrong prices. This function resets
address shipping calculation but can seriously slow down the
process (on a system with many shipping options available).
Use it carefully only when necesarry.

@param \Magento\Quote\Model\Quote\Address $shippingAddress
Reset shipping calculation