Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Replaces the discount text with the description when an EM Coupon has been applied.
- *
- * @param string $text The default discount text (15.00% Off)
- * @param object $EM_Coupon The Events Manager Pro Coupon object.
- * @return string
- */
- function stonehenge_em_change_coupon_output( $text, $EM_Coupon ) {
- return $EM_Coupon->coupon_description;
- }
- add_filter( 'em_coupon_get_discount_text', 'stonehenge_em_change_coupon_output', 10, 2 );
Advertisement
Add Comment
Please, Sign In to add comment