From 63fedf4ab777909e3974b68f9a5c99b0a6b32b9a Mon Sep 17 00:00:00 2001 From: Joe Dolson Date: Tue, 19 Dec 2023 16:41:38 -0600 Subject: [PATCH] Get fallback values for pricing UI if not saved; don't echo checked --- src/mt-processing.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/mt-processing.php b/src/mt-processing.php index cbfb9121..464d8f0c 100644 --- a/src/mt-processing.php +++ b/src/mt-processing.php @@ -328,9 +328,9 @@ function mt_registration_fields( $form, $has_data, $data, $public = 'admin' ) {
' . __( 'Ticket Counting Method', 'my-tickets' ) . "

-
-
- +
+
+

'; if ( false !== $description ) { @@ -380,6 +380,9 @@ function mt_registration_fields( $form, $has_data, $data, $public = 'admin' ) { * @return string */ function mt_prices_table( $registration = array() ) { + if ( empty( $registration ) ) { + $registration = mt_get_settings( 'defaults' )['continuous']; + } $counting = $registration['counting_method']; $available = ''; $tickets = ( isset( $registration['tickets'] ) ) ? $registration['tickets'] : false;