diff --git a/public_html/wp-content/plugins/camptix/camptix.php b/public_html/wp-content/plugins/camptix/camptix.php
index f28a1164f..e1272af8c 100644
--- a/public_html/wp-content/plugins/camptix/camptix.php
+++ b/public_html/wp-content/plugins/camptix/camptix.php
@@ -2392,6 +2392,23 @@ function update_stats( $key, $value ) {
return;
}
+ /**
+ *
+ * Increments the stat used on the ticket form.
+ *
+ * @param $key
+ * @return void
+ */
+ function increment_ticket_form_stat( $key ) {
+ if ( $key !== 'tickets_form_unique_visitors' ) {
+ return;
+ }
+ $viewing_stat = get_option( 'camptix_ticket_form_stat', 0 );
+ $viewing_stat++;
+ update_option( 'camptix_ticket_form_stat', $viewing_stat, 'no' );
+ return;
+ }
+
/**
* Increments a stats value.
*/
@@ -2482,7 +2499,7 @@ public function process_client_stats() {
switch ( $_REQUEST['command'] ) {
case 'increment':
- $this->increment_stats( $_REQUEST['stat'] );
+ $this->increment_ticket_form_stat( $_REQUEST['stat'] );
wp_send_json_success();
break;
}
@@ -2701,6 +2718,14 @@ function generate_revenue_report_data() {
$this->update_stats( 'discounted', $totals->discounted );
$this->update_stats( 'revenue', $totals->revenue );
+ $this->update_stats_multi( [
+ 'sold' => $totals->sold,
+ 'remaining' => $totals->remaining,
+ 'subtotal' => $totals->sub_total,
+ 'discounted' => $totals->discounted,
+ 'revenue' => $totals->revenue,
+ ] );
+
$results = array(
'totals' => $totals,
'actual_total' => $actual_total,