function commerce_multicurrency_conversion_settings_form_submit in Commerce Multicurrency 7
Submit handler for the conversion settings form.
File
- ./
commerce_multicurrency.admin.inc, line 174 - Administrative UI for commerce currency.
Code
function commerce_multicurrency_conversion_settings_form_submit($form, &$form_state) {
variable_set('commerce_multicurrency_conversion_settings', $form_state['values']['conversion_settings']);
variable_set('commerce_multicurrency_sync_provider', $form_state['values']['sync_provider']);
variable_set('commerce_multicurrency_use_cross_conversion', $form_state['values']['use_cross_sync']);
if (!empty($form_state['values']['sync_now'])) {
commerce_multicurrency_sync_exchange_rates_now();
}
else {
// Ensure the settings are in sync.
commerce_currencies(FALSE, TRUE);
}
}