I have Magento 2 store and would like to get current currency code. I knew I can use method “getCurrentCurrencyCode” to get current currency code from Magento but how can I get from Magento 2
You call method “getCurrentCurrency” from storeManager model to get current currency code.
$_objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$storeManager = $_objectManager->create('\Magento\Store\Model\StoreManagerInterface');
$code = $storeManager->getStore()->getCurrentCurrency()->getCode();