function commerce_multicurrency_commerce_multicurrency_exchange_rate_sync_provider in Commerce Multicurrency 7
Returns currency exchange rate sync providers.
Returns all available currency exchange rate sync providers or as single provider if a code is defined. If no matching provider was found FALSE is returned.
Parameters
string $code: The code of the currency exchange rate sync provider to return.
Return value
array|FALSE List of providers, provider or FALSE on failure.
2 calls to commerce_multicurrency_commerce_multicurrency_exchange_rate_sync_provider()
- commerce_multicurrency_conversion_settings_form in ./
commerce_multicurrency.admin.inc - Form to configure conversion settings.
- commerce_multicurrency_sync_exchange_rates in ./
commerce_multicurrency.module - Update the currency exchange rates.
File
- ./
commerce_multicurrency.module, line 94 - Enhancements for the commerce currency support.
Code
function commerce_multicurrency_commerce_multicurrency_exchange_rate_sync_provider($code = NULL) {
$providers = module_invoke_all('commerce_multicurrency_exchange_rate_sync_provider_info');
drupal_alter('commerce_multicurrency_exchange_rate_sync_provider_info', $providers);
if ($code) {
if (isset($providers[$code])) {
return $providers[$code];
}
return FALSE;
}
return $providers;
}