You are here

function commerce_multicurrency_currency_conversion in Commerce Multicurrency 7

Rules Action Callback: Convert price to another currency.

File

./commerce_multicurrency.rules.inc, line 105
Commerce Multicurrency rules integration.

Code

function commerce_multicurrency_currency_conversion($commerce_price, $currency) {
  $commerce_price['amount'] = commerce_currency_convert($commerce_price['amount'], $commerce_price['currency_code'], $currency);
  $commerce_price['currency_code'] = $currency;
  return array(
    'result' => $commerce_price,
  );
}