function commerce_customer_customer_profile_delete_form_submit in Commerce Core 7
Submit callback for commerce_customer_profile_delete_form().
1 string reference to 'commerce_customer_customer_profile_delete_form_submit'
- commerce_customer_customer_profile_delete_form in modules/
customer/ includes/ commerce_customer_profile.forms.inc - Form callback: confirmation form for deleting a profile.
File
- modules/
customer/ includes/ commerce_customer_profile.forms.inc, line 199 - Forms for creating / editing and deleting customer profiles.
Code
function commerce_customer_customer_profile_delete_form_submit($form, &$form_state) {
$profile = $form_state['customer_profile'];
if (commerce_customer_profile_delete($profile->profile_id)) {
drupal_set_message(t('The profile has been deleted.'));
watchdog('commerce_customer_profile', 'Deleted customer profile @profile_id.', array(
'@profile_id' => $profile->profile_id,
), WATCHDOG_NOTICE);
}
else {
drupal_set_message(t('The profile could not be deleted.'), 'error');
}
}