Skip to content

Commit

Permalink
Default coupon discount text to 0%.
Browse files Browse the repository at this point in the history
Some WordCamps include coupons for tracking purposes, that doesn't actually change the ticketed price.
  • Loading branch information
dd32 authored Nov 5, 2024
1 parent 7e1d8d2 commit 429503d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion public_html/wp-content/plugins/camptix/camptix.php
Original file line number Diff line number Diff line change
Expand Up @@ -5675,8 +5675,9 @@ function form_start() {
<?php if ( $this->coupon ) : ?>
<input type="hidden" name="tix_coupon" value="<?php echo esc_attr( $this->coupon->post_title ); ?>" />
<?php
$discount_price = (float) $this->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 ) {
Expand Down

0 comments on commit 429503d

Please sign in to comment.