function commerce_product_bundle_line_item_title in Commerce Product Bundle 7.2
Same name and namespace in other branches
- 7 commerce_product_bundle.module \commerce_product_bundle_line_item_title()
Returns an appropriate title for this line item.
@Todo If this function do something other than returning a title, use it in commerce_product_bundle_add_to_cart_form_submit().
File
- ./
commerce_product_bundle.module, line 1053 - Allows the bundling of products in Drupal Commerce.
Code
function commerce_product_bundle_line_item_title($line_item) {
// Currently, just return the product's title. However, in the future replace
// this with the product preview build mode.
if ($product = entity_metadata_wrapper('commerce_line_item', $line_item)->commerce_product
->value()) {
return check_plain($product->title);
}
}