I am converting price from any other currency using currency code to base currency and for this I am using this method :
$oldCurrency = 'AUD'; $newCurrency = 'USD'; $priceHelper = $objectManager->create('Magento\Directory\Helper\Data'); $priceHelper->currencyConvert($item->getCustomPrice(), $oldCurrency, $newCurrency);
My base currency is USD and
USD to AUD conversion rate is defined in admin.
When I am converting price from
USD to AUD then its working, but when I am trying to convert price from
AUD to USD then it gives me error that conversion rate is not defined.
How do I convert price from any currency to any other currency ?