You are here

function commerce_order_ui_form_commerce_order_ui_order_delete_form_alter in Commerce Core 7

Implements hook_form_FORM_ID_alter().

The Order UI module instantiates the Order delete form at a particular path in the Commerce IA. It uses its own form ID to do so and alters the form here to add in appropriate redirection.

See also

commerce_order_ui_order_delete_form()

File

modules/order/commerce_order_ui.module, line 303

Code

function commerce_order_ui_form_commerce_order_ui_order_delete_form_alter(&$form, &$form_state) {
  $form['actions']['cancel']['#href'] = 'admin/commerce/orders';
  $form['#submit'][] = 'commerce_order_ui_order_delete_form_submit';
}