You are here

function commerce_customer_profile_delete in Commerce Core 7

Deletes a customer profile by ID.

Parameters

$profile_id: The ID of the customer profile to delete.

$entity_context: An optional entity context array that specifies the entity through whose customer profile reference field the given profile is being deleted:

  • entity_type: The type of entity.
  • entity_id: The unique ID of the entity.

Return value

TRUE on success, FALSE otherwise.

2 calls to commerce_customer_profile_delete()
commerce_customer_customer_profile_delete_form_submit in modules/customer/includes/commerce_customer_profile.forms.inc
Submit callback for commerce_customer_profile_delete_form().
commerce_customer_profile_manager_validate in modules/customer/commerce_customer.module
Validation callback for a commerce_customer_profile_manager element.

File

modules/customer/commerce_customer.module, line 669
Defines the customer profile entity and API functions to manage customers and interact with them.

Code

function commerce_customer_profile_delete($profile_id, $entity_context = array()) {
  return commerce_customer_profile_delete_multiple(array(
    $profile_id,
  ), $entity_context);
}