function hook_commerce_currency_info_alter in Commerce Core 7
Allows modules to alter Commerce currency definitions.
By default Commerce provides all active currencies according to ISO 4217. This hook allows you to change the formatting properties of existing definitions.
Additionally, because every currency's default conversion rate is 1, this hook can be used to populate currency conversion rates with meaningful values. Conversion rates can be calculated using any currency as the base currency as long as the same base currency is used for every rate.
See also
1 invocation of hook_commerce_currency_info_alter()
- commerce_currencies in ./
commerce.module - Returns an array of all available currencies.
File
- ./
commerce.api.php, line 89 - This file contains no working PHP code; it exists to provide additional documentation for doxygen as well as to document hooks in the standard Drupal manner.
Code
function hook_commerce_currency_info_alter(&$currencies, $langcode) {
$currencies['CHF']['code_placement'] = 'after';
}