You are here

function commerce_reset_delete_customer_profiles in Commerce Reset 7

Delete customer profiles callback.

2 string references to 'commerce_reset_delete_customer_profiles'
commerce_reset_commerce_reset_reset_items in ./commerce_reset.module
Define commerce reset callbacks.
commerce_reset_form_commerce_reset_batch_form_alter in ./commerce_reset.module
Implements hook_form_BASE_FORM_ID_alter().

File

./commerce_reset.module, line 213

Code

function commerce_reset_delete_customer_profiles($details, &$context) {
  watchdog(__FUNCTION__, $details['id']);
  commerce_customer_profile_delete($details['id']);
  $context['message'] = 'Deleting customer profiles: ' . $details['current'] . ' of ' . $details['total'];
  if ($details['current'] == $details['total']) {
    db_query('ALTER TABLE {commerce_customer_profile} AUTO_INCREMENT = 1');
    db_query('ALTER TABLE {commerce_customer_profile_revision} AUTO_INCREMENT = 1');
  }
}