function commerce_discount_line_item_title in Commerce Discount 7
Determine the discount's line item title.
Return value
string The line item title.
1 string reference to 'commerce_discount_line_item_title'
File
- ./
commerce_discount.module, line 894 - Defines the discount and discount offer entities, bundles and functionality.
Code
function commerce_discount_line_item_title($line_item) {
$discount = entity_load_single('commerce_discount', $line_item->data['discount_name']);
if (is_object($discount) && !empty($discount->component_title)) {
return check_plain($discount->component_title);
}
return t('Fixed amount discount');
}