Model
PriceCurrency
Magento\Directory\Model\PriceCurrency
What it does
PriceCurrency handles currency conversion and formatting for prices in Magento 2.
Developers use this class when they need to convert amounts between currencies, format prices with proper currency symbols, or round monetary values with specific precision.
It's the standard way to handle price display and currency operations across stores with different currencies.
Public Methods
- convert()
- convertAndRound()
- format()
- convertAndFormat()
- getCurrency()
- getCurrencySymbol()
- round()
- roundPrice()