1. commerce
    1. 7
7 commerce_product_type_load($type)

Loads a product type.


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

▾ 6 functions call commerce_product_type_load()

CommerceProductCRUDTestCase::testCommerceProductTypeCrud in modules/product/tests/commerce_product.test
Test the product type CRUD functions.
commerce_product_ui_help in modules/product/commerce_product_ui.module
Implements hook_help().
commerce_product_ui_product_type_delete in modules/product/commerce_product_ui.module
Deletes a product type.
commerce_product_ui_product_type_delete_form_wrapper in modules/product/includes/
Form callback wrapper: confirmation form for deleting a product type.
commerce_product_ui_product_type_form_wrapper in modules/product/includes/
Form callback wrapper: create or edit a product type.
commerce_product_ui_product_type_update_access in modules/product/commerce_product_ui.module
Access callback: determines if the user can edit or delete a product type.


modules/product/commerce_product.module, line 387

function commerce_product_type_load($type) {
  $type = strtr($type, array('-' => '_'));
  $product_types = commerce_product_types();
  return !empty($product_types[$type]) ? $product_types[$type] : FALSE;