function commerce_customer_profile_save in Commerce Core 7
Saves a customer profile.
Parameters
$profile: The full customer profile object to save. If $profile->profile_id is empty, a new customer profile will be created.
Return value
SAVED_NEW or SAVED_UPDATED depending on the operation performed.
4 calls to commerce_customer_profile_save()
- CommerceBaseTestCase::createDummyCustomerProfile in tests/
commerce_base.test - Create a customer profile.
- commerce_customer_customer_profile_form_submit in modules/
customer/ includes/ commerce_customer_profile.forms.inc - Submit callback for commerce_customer_profile_form().
- commerce_customer_profile_manager_validate in modules/
customer/ commerce_customer.module - Validation callback for a commerce_customer_profile_manager element.
- commerce_customer_profile_pane_checkout_form_submit in modules/
customer/ includes/ commerce_customer.checkout_pane.inc - Checkout pane callback: submits a customer profile edit form.
File
- modules/
customer/ commerce_customer.module, line 600 - Defines the customer profile entity and API functions to manage customers and interact with them.
Code
function commerce_customer_profile_save($profile) {
return entity_get_controller('commerce_customer_profile')
->save($profile);
}