Skip to content

Commit

Permalink
Sniffs
Browse files Browse the repository at this point in the history
  • Loading branch information
joedolson committed Dec 18, 2023
1 parent 71ad006 commit 0b777ae
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 13 deletions.
3 changes: 1 addition & 2 deletions src/mt-payment-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ];
Expand Down
16 changes: 8 additions & 8 deletions src/mt-processing.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "<table class='widefat mt-pricing mt-$counting'>
$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 = "<table class='widefat mt-pricing mt-$counting'>
<caption>" . __( 'Ticket Prices and Availability', 'my-tickets' ) . "</caption>
<thead>
<tr>
Expand All @@ -398,7 +398,7 @@ function mt_prices_table( $registration = array() ) {
</tr>
</thead>
<tbody>';
$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 = "<input type='text' name='mt_tickets[]' id='mt_tickets' value='' size='8' />";
$total = '<input type="hidden" name="mt_tickets_total" value="inherit" />';
Expand All @@ -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 ) ? '<div class="mt-date-time-picker">' . mt_datepicker_html( $args ) . '<label for="mt_label_picker_time_' . $label . '" class="screen-reader-text">' . __( 'Time', 'my-tickets' ) . '</label><input type="time" name="mt_label_time[]" id="mt_label_picker_time_' . $label . '"></div>' : '';
$label_class = ( 'event' === $counting ) ? 'duet-fallback' : '';
Expand Down
1 change: 0 additions & 1 deletion src/mt-ticketing-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ function mt_ticketing_settings() {
<option value='integer'" . selected( $mt_tickets_close_type, 'integer', false ) . '>' . __( 'Specific number of tickets', 'my-tickets' ) . "</option>
<option value='percent'" . selected( $mt_tickets_close_type, 'percent', false ) . '>' . __( 'Percentage of available tickets', 'my-tickets' ) . '</option>
</select></p>';

$mt_show_closed = ( isset( $options['mt_show_closed'] ) ) ? $options['mt_show_closed'] : 'false';
$form .= "<p class='handling ticket-show-closed'><label for='mt_tickets_show_closed'>" . __( 'Show ticket types that are closed in Add to Cart form', 'my-tickets' ) . "</label> <input name='mt_show_closed' id='mt_tickets_show_closed' type='checkbox' value='true'" . checked( $mt_show_closed, 'true', false ) . ' /></p>';
$mt_hide_remaining = ( isset( $options['mt_hide_remaining'] ) ) ? $options['mt_hide_remaining'] : 'false';
Expand Down
4 changes: 2 additions & 2 deletions src/my-tickets.php
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ function mt_default_settings() {
),
);

$messages = array(
$messages = array(
'completed' => array(
'purchaser' => array(
'subject' => 'Thanks for your purchase from {blogname}',
Expand Down Expand Up @@ -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',
Expand Down

0 comments on commit 0b777ae

Please sign in to comment.