Magento 2: How To Get Current Currency Code

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();
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments