function commerce_product_ui_form_commerce_product_ui_product_delete_form_alter in Commerce Core 7
Implements hook_form_FORM_ID_alter().
The Product UI module instantiates the Product 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_product_ui_product_delete_form()
File
- modules/
product/ commerce_product_ui.module, line 501
Code
function commerce_product_ui_form_commerce_product_ui_product_delete_form_alter(&$form, &$form_state) {
$form['actions']['cancel']['#href'] = 'admin/commerce/products';
$form['#submit'][] = 'commerce_product_ui_product_delete_form_submit';
}