You are here

function commerce_payment_ui_form_commerce_payment_ui_payment_transaction_delete_form_alter in Commerce Core 7

Implements hook_form_FORM_ID_alter().

The Payment UI module instantiates the payment transaction 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_payment_ui_payment_transaction_delete_form()

File

modules/payment/commerce_payment_ui.module, line 207
Default Payment UI for Drupal Commerce.

Code

function commerce_payment_ui_form_commerce_payment_ui_payment_transaction_delete_form_alter(&$form, &$form_state) {
  $form['actions']['cancel']['#href'] = 'admin/commerce/orders/' . $form_state['order']->order_id . '/payment';
  $form['#submit'][] = 'commerce_payment_ui_payment_transaction_delete_form_submit';
}