You are here

function commerce_customer_ui_form_commerce_customer_ui_customer_profile_delete_form_alter in Commerce Core 7

Implements hook_form_FORM_ID_alter().

The Customer UI module instantiates the Profile 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_customer_ui_customer_profile_delete_form()

File

modules/customer/commerce_customer_ui.module, line 338

Code

function commerce_customer_ui_form_commerce_customer_ui_customer_profile_delete_form_alter(&$form, &$form_state) {
  $form['actions']['cancel']['#href'] = 'admin/commerce/customer-profiles';
  $form['#submit'][] = 'commerce_customer_ui_customer_profile_delete_form_submit';
}