You are here

function commerce_reset_finished in Commerce Reset 7

Batch finished callback.

1 string reference to 'commerce_reset_finished'
commerce_reset_generate_batch_items in ./commerce_reset.module
Batch generate items.

File

./commerce_reset.module, line 251

Code

function commerce_reset_finished($success, $results, $operations) {
  if ($success) {
    drupal_set_message(t('Commerce reset batch process complete.'));
  }
  else {

    // An error occurred.
    // $operations contains the operations that remained unprocessed.
    $error_operation = reset($operations);
    $args = array(
      '@operation' => $error_operation[0],
      '@args' => print_r($error_operation[0], TRUE),
    );
    drupal_set_message(t('An error occurred while processing @operation with arguments : @args', $args));
  }
}