From 429503d4c8e5dde9195505385ed7323ff9131c86 Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Tue, 5 Nov 2024 15:17:21 +1000 Subject: [PATCH] Default coupon discount text to 0%. 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 f81696d27..3cd41c495 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 ) {