You are here

function commerce_customer_profile_type_load in Commerce Core 7

Loads a customer profile type.

Parameters

$type: The machine-readable name of the customer profile type; accepts normal machine names and URL prepared machine names with underscores replaced by hyphens.

6 calls to commerce_customer_profile_type_load()
commerce_customer_customer_profile_form in modules/customer/includes/commerce_customer_profile.forms.inc
Form callback: create or edit a customer profile.
commerce_customer_field_widget_form in modules/customer/commerce_customer.module
Implements hook_field_widget_form().
commerce_customer_profile_label in modules/customer/commerce_customer.module
Entity label callback: returns the label for an individual customer profile.
commerce_customer_profile_pane_checkout_form in modules/customer/includes/commerce_customer.checkout_pane.inc
Checkout pane callback: returns a customer profile edit form.
commerce_customer_ui_form_alter in modules/customer/commerce_customer_ui.module
Implements hook_form_alter().

... See full list

File

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

Code

function commerce_customer_profile_type_load($type) {
  $type = strtr($type, array(
    '-' => '_',
  ));
  $profile_types = commerce_customer_profile_types();
  return !empty($profile_types[$type]) ? $profile_types[$type] : FALSE;
}