You are here

function commerce_order_rules_update_state in Commerce Core 7

Rules action: updates an order's status to the default status of the given order state.

1 string reference to 'commerce_order_rules_update_state'
commerce_order_rules_action_info in modules/order/commerce_order.rules.inc
Implements hook_rules_action_info().

File

modules/order/commerce_order.rules.inc, line 505
Rules integration for orders.

Code

function commerce_order_rules_update_state($order, $name) {
  $order_state = commerce_order_state_load($name);
  commerce_order_status_update($order, $order_state['default_status'], FALSE, NULL, t('Order state updated via Rules.'));
}