calendar->calendar_obj->term_id) ? (int)$appt_obj->calendar->calendar_obj->term_id : 0 ); if ( !$app_id || $app_action!=='edit' || $source!=='booked_wc_extension' ) { return; } $date = $_POST['date']; $timeslot = $_POST['timeslot']; $timeslot_parts = explode('-',$timeslot); $date_format = get_option('date_format'); $time_format = get_option('time_format'); if ($timeslot_parts[0] == '0000' && $timeslot_parts[1] == '2400') { $timeslotText = 'All day'; } else { $timeslotText = date_i18n($time_format,strtotime($timeslot_parts[0])) . (!get_option('booked_hide_end_times') ? ' – '.date_i18n($time_format,strtotime($timeslot_parts[1])) : ''); } $reached_limit = false; $input_date = date('Y-m-j', strtotime($date)); $input_timestamp = strtotime($date.' '.$timeslot_parts[0]); $input_customer_type = 'current'; $current_user = wp_get_current_user(); $appt_timeslot = $timeslotText ? $timeslotText : ''; $appt_date_name = date_i18n( $date_format, strtotime( $date ) ); $user_nickname = get_user_meta($current_user->ID, 'nickname', true); ?>