function commerce_price_decimals_for_all_commerce_price_savings_formatter_prices_alter in Commerce Price Decimals Formatter 7
Implements hook_commerce_price_savings_formatter_prices_alter().
File
- modules/
commerce_price_decimals_for_all.module, line 51 - Add support for other modules can use the format of Commerce Price Decimmals Formmater
Code
function commerce_price_decimals_for_all_commerce_price_savings_formatter_prices_alter(&$formatted_prices, $context) {
foreach ($formatted_prices as $price_type => $formatted_price) {
// Alter the formatted price.
$formatted_prices[$price_type]['formatted'] = commerce_price_decimals_formatter_currency_format($formatted_price['amount'], $formatted_price['currency_code'], $context['settings'], $context['entity']);
}
}