From 0b777ae74674859bb4745f62b9c193fa2f3207c4 Mon Sep 17 00:00:00 2001 From: Joe Dolson Date: Sun, 17 Dec 2023 19:04:32 -0600 Subject: [PATCH] Sniffs --- src/mt-payment-settings.php | 3 +-- src/mt-processing.php | 16 ++++++++-------- src/mt-ticketing-settings.php | 1 - src/my-tickets.php | 4 ++-- 4 files changed, 11 insertions(+), 13 deletions(-) diff --git a/src/mt-payment-settings.php b/src/mt-payment-settings.php index 2abeb75c..67a668da 100644 --- a/src/mt-payment-settings.php +++ b/src/mt-payment-settings.php @@ -499,8 +499,7 @@ function mt_currency() { * @return bool */ function mt_zerodecimal_currency() { - $options = mt_get_settings(); - + $options = mt_get_settings(); $currency = $options['mt_currency']; $currencies = mt_currency(); $data = $currencies[ $currency ]; diff --git a/src/mt-processing.php b/src/mt-processing.php index ebcde02e..0004cf10 100644 --- a/src/mt-processing.php +++ b/src/mt-processing.php @@ -380,12 +380,12 @@ function mt_registration_fields( $form, $has_data, $data, $public = 'admin' ) { * @return string */ function mt_prices_table( $registration = array() ) { - $counting = $registration['counting_method']; - $available = ''; - $tickets = ( isset( $registration['tickets'] ) ) ? $registration['tickets'] : false; - $label = ( 'event' === $counting ) ? __( 'Event Date & Time', 'my-tickets' ) : __( 'Label', 'my-tickets' ); - $type = ( 'event' === $counting ) ? 'hidden' : 'text'; - $return = " + $counting = $registration['counting_method']; + $available = ''; + $tickets = ( isset( $registration['tickets'] ) ) ? $registration['tickets'] : false; + $label = ( 'event' === $counting ) ? __( 'Event Date & Time', 'my-tickets' ) : __( 'Label', 'my-tickets' ); + $type = ( 'event' === $counting ) ? 'hidden' : 'text'; + $return = "
@@ -398,7 +398,7 @@ function mt_prices_table( $registration = array() ) { '; - $counting = ( isset( $registration['counting_method'] ) ) ? $registration['counting_method'] : $counting; + $counting = ( isset( $registration['counting_method'] ) ) ? $registration['counting_method'] : $counting; if ( 'discrete' === $counting || 'event' === $counting ) { $available_empty = ""; $total = ''; @@ -422,7 +422,7 @@ function mt_prices_table( $registration = array() ) { $args = array( 'id' => "mt_label_$label", 'name' => 'mt_label[]', - 'value' => date( 'Y-m-d', strtotime( $options['label'] ) ), + 'value' => gmdate( 'Y-m-d', strtotime( $options['label'] ) ), ); $label_field = ( 'event' === $counting ) ? '
' . mt_datepicker_html( $args ) . '
' : ''; $label_class = ( 'event' === $counting ) ? 'duet-fallback' : ''; diff --git a/src/mt-ticketing-settings.php b/src/mt-ticketing-settings.php index 13703033..b24e1c51 100644 --- a/src/mt-ticketing-settings.php +++ b/src/mt-ticketing-settings.php @@ -196,7 +196,6 @@ function mt_ticketing_settings() {

'; - $mt_show_closed = ( isset( $options['mt_show_closed'] ) ) ? $options['mt_show_closed'] : 'false'; $form .= "

'; $mt_hide_remaining = ( isset( $options['mt_hide_remaining'] ) ) ? $options['mt_hide_remaining'] : 'false'; diff --git a/src/my-tickets.php b/src/my-tickets.php index aacaee81..b0a80c2c 100644 --- a/src/my-tickets.php +++ b/src/my-tickets.php @@ -497,7 +497,7 @@ function mt_default_settings() { ), ); - $messages = array( + $messages = array( 'completed' => array( 'purchaser' => array( 'subject' => 'Thanks for your purchase from {blogname}', @@ -610,7 +610,7 @@ function mt_default_settings() { 'reg_expires' => '3', 'multiple' => 'true', 'pricing' => array( - 'section-a' => array( + 'section-a' => array( 'label' => 'Section A', 'price' => '20', 'tickets' => '40',
" . __( 'Ticket Prices and Availability', 'my-tickets' ) . "