From 5cf081c724d9078826738ee128d35c8ff525862d Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Tue, 5 Nov 2024 15:36:53 +1000 Subject: [PATCH] Default coupon discount text to 0%. (#1425) Some WordCamps include coupons for tracking purposes, that doesn't actually change the ticketed price. --- public_html/wp-content/plugins/camptix/camptix.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public_html/wp-content/plugins/camptix/camptix.php b/public_html/wp-content/plugins/camptix/camptix.php index 67c50920b..4182556df 100644 --- a/public_html/wp-content/plugins/camptix/camptix.php +++ b/public_html/wp-content/plugins/camptix/camptix.php @@ -5675,8 +5675,9 @@ function form_start() { coupon ) : ?> coupon->tix_discount_price; + $discount_price = (float) $this->coupon->tix_discount_price; $discount_percent = (float) $this->coupon->tix_discount_percent; + $discount_text = '0%'; if ( $discount_price > 0 ) { $discount_text = $this->append_currency( $discount_price ); } elseif ( $discount_percent > 0 ) {