You are here

function hook_commerce_customer_profile_can_delete in Commerce Core 7

Determines whether or not a given customer profile can be deleted.

Customer profiles store essential data for past orders, so they should not be easily deletable to prevent critical data loss. This hook lets modules tell the Customer module that a given customer profile should not be deletable. The Order module uses this hook to prevent the deletion of customer profiles attached to orders outside of the context of a single order that references the profile.

Parameters

$profile: The customer profile object to be deleted.

Return value

Implementations of this hook need only return FALSE if the given customer profile cannot be deleted for some reason.

See also

commerce_order_commerce_customer_profile_can_delete()

1 function implements hook_commerce_customer_profile_can_delete()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

commerce_order_commerce_customer_profile_can_delete in modules/order/commerce_order.module
Implements hook_commerce_customer_profile_can_delete().
1 invocation of hook_commerce_customer_profile_can_delete()
commerce_customer_profile_can_delete in modules/customer/commerce_customer.module
Determines whether or not the give customer profile can be deleted.

File

modules/customer/commerce_customer.api.php, line 128
Hooks provided by the Customer module.

Code

function hook_commerce_customer_profile_can_delete($profile) {

  // No example.
}