Hi,
The time isn’t necessary because it will get removed anyway in the confirmation mail, custom function:
/** DATE_ONLY **/
add_filter( 'app_email_replace_pre', 'app_pholder_date_only', 10, 2 );
function app_pholder_date_only( $text, $r ) {
if ( empty( $r->ID ) ) {
return $text;
}
$booking = wpb_get_booking( $r->ID );
return str_replace( 'DATE_ONLY', $bo
Note: I have 20 slots per day, which are also gets displayed at the calendar, custom function:
/**
* Fill calendar cell with available worker count
* Return array
*/
add_filter( 'app_weekly_calendar_cell_fill', 'app_calendar_cell_fill', 10, 2 );
add_filter( 'app_monthly_calendar_cell_fill', 'app_calendar_cell_fill', 10, 2 );
function app_calendar_cell_fill( $arr, $slot ) {
if ( $slot->reason || is_admin() && !(defined( 'WPB_AJAX' ) && WPB_AJAX ) ) {
return $arr;
}
if ( $slot->calendar->is_admin() ) {
return $arr;
}
$start = $slot->get_start();
$end = $slot->get_end();
$busy = isset( $slot->stat[$start][$end]['count'] ) ? $slot->stat[$start][$end]['count'] : 0;
if ( $slot->get_worker() ) {
$avail = 1;
} else {
$avail = isset( $slot->stat[$start][$end]['available'] ) ? $slot->stat[$start][$end]['available'] : $slot->available_workforce( );
}
$result = max( 0, $avail - $busy );
$fill = !empty($arr['fill']) ? $arr['fill'].'<span style="font-size: 14px;">'.$result.'/20</span>' : $result;
return array( 'class_name' => 'app-cell-centered', 'fill' => $fill );
}
/**
* Example of custom time table display for monthly calendar for a 12-hours service
* You can wrap the output with span tag for easier styling, e.g. return '<span>Morning Session</span>'
*/
add_filter( 'app_timetable_cell_fill', 'app_custom_time_display', 10, 2 );
function app_custom_time_display( $display, $slot ) {
$service = $slot->get_service();
if ( $service != 1 || BASE()->is_package( $service ) ) # Replace with your service ID
return $display;
if ( date( 'G', $slot->get_start() ) < 12 ) {
return '<span style="font-size: 14px;">Freie Pl?tze:</span>';
} else {
return '<span style="font-size: 14px;">Freie Pl?tze:</span>';
}
}