function commerce_multicurrency_tokens in Commerce Multicurrency 7
Implements hook_tokens().
File
- ./
commerce_multicurrency.tokens.inc, line 24 - Token callbacks for the commerce_multicurrency module.
Code
function commerce_multicurrency_tokens($type, $tokens, array $data = array(), array $options = array()) {
$replacements = array();
if ($type == 'user') {
if (isset($tokens['commerce-currency-code'])) {
$replacements[$tokens['commerce-currency-code']] = commerce_multicurrency_get_user_currency_code();
}
}
return $replacements;
}