function hook_commerce_coupon_value_display_alter in Commerce Coupon 7.2
Alter the final output of the coupon value display views handler.
Parameters
string $output: The field handler output
CommerceCoupon $coupon: The coupon entity being displayed
object $order: The order that the coupon is attached to
1 invocation of hook_commerce_coupon_value_display_alter()
- commerce_coupon_handler_field_discount_value_display::render in includes/
views/ handlers/ commerce_coupon_handler_field_discount_value_display.inc - Overrides parent::render().
File
- ./
commerce_coupon.api.php, line 197
Code
function hook_commerce_coupon_value_display_alter($output, $coupon, $order) {
// Change the display for all discount coupons.
if ($coupon->type == 'discount_coupon') {
$output = t('Discount coupon');
}
}