You are here

function commerce_line_item_update_7000 in Commerce Core 7

Update Rules using unit price manipulation actions to set a default value for the rounding mode to use on the updated unit price amount.

File

modules/line_item/commerce_line_item.install, line 124

Code

function commerce_line_item_update_7000() {
  drupal_flush_all_caches();

  // Loop over all defined Rules configurations.
  foreach (rules_config_load_multiple(FALSE) as $rule) {
    if ($rule instanceof RulesContainerPlugin) {
      _commerce_line_item_update_rule_container_round_mode($rule);
    }
    else {
      _commerce_line_item_update_rule_round_mode($rule);
    }
  }
  return t('Rules updated to set a default rounding mode actions that manipulate unit prices.');
}