Hello Stephen,
I have question about possibility to define custom statuses of bookings. Generally I have course registration and sometimes the participants not finish the course in defined period so we have to invite him to post course.
For me will be very usefull if I can define custom booking statuses like “Course started” “Course completed”. Is there some way to do it?
Thanks a lot Kamil
Kamil Konečný
Hi Kamil,
Yes you can register custom booking statuses. The function is essentially a wrapper for register_post_status
(https://developer.wordpress.org/reference/functions/register_post_status/)., but with two additional flags: whether the status should be considered “confirmed” (i.e. the booking is confirmed) and whether it should “reserve” spaces (e.g. depending on setttings, the ‘pending’ status might reserve bookings but such a booking is not considered confirmed).
add_action('init', function(){
if (!function_exists('eo_register_booking_status')) {
return;
}
eo_register_booking_status('course_strated', array(
'label' => "Course started",
'include_in_confirmed' => true,
'reserve_spaces' => true,
'show_in_admin_all_list' => true,
'show_in_admin_status_list' => true,
));
});
However, please note that there appears to be an issue in that custom statuses aren’t picked up on the bookings admin page filter. I’ll look into that.
Stephen Harris
Thanks a lot Stephen,
If you will find how to filter bookees by the custom statuses it will be very helpfull for us.
Have a nice day Kamil
Kamil Konečný
That should be fixed in the next version of Pro (3.3.0), which I’ll release later this week.
Stephen Harris