Hello.
Yes, the Booking Calendar can not import the bookings via CSV file, yet.
If you want to make your custom soution for importing bookings from the CSV file, then probably you need to check this FAQ: https://wpbookingcalendar.com/faq/booking-calendar-api/
You can use this function: wpbc_api_booking_add_new for creation of the new bookings in the Booking Calendar plugin.
Example:
$booking = array(
'dates' => array( '2027-06-24', '2027-06-24', '2027-06-25', '2027-06-26' ),
'data' => array(
'secondname' => array( 'value' => 'Rika', 'type' => 'text' ),
'name' => 'John',
'email' => array( 'value' => '[email protected]', 'type' => 'email' ),
)
);
$booking_id = wpbc_api_booking_add_new( $booking['dates'], $booking['data'] );
Other Example for paid version, where you specified the ID of booking resource (calendar), where to save the booking:
$booking = array(
'dates' => array( '2027-08-24', '2027-08-25', '2027-08-26' ),
'data' => array(
'secondname' => array( 'value' => 'Smith', 'type' => 'text' ),
'name' => 'John',
'rangetime' => array( 'value' => '14:00 - 16:00', 'type' => 'selectbox-one' ),
'email' => array( 'value' => '[email protected]', 'type' => 'email' ),
),
'resource_id' => 3,
);
$booking_id = wpbc_api_booking_add_new( $booking['dates'], $booking['data'], $booking['resource_id'] );
Please note, both examples will create a new bookings, only in case if the dates (and times, if provided) is available in destination booking resource (calendar). In case if you want to create a new booking without checking if the dates / times available and create booking in any case, then use the new parameter, like in this example:
$booking = array(
'dates' => array( '2027-08-24', '2027-08-25', '2027-08-26' ),
'data' => array(
'secondname' => array( 'value' => 'Smith', 'type' => 'text' ),
'name' => 'John',
'rangetime' => array( 'value' => '14:00 - 16:00', 'type' => 'selectbox-one' ),
'email' => array( 'value' => '[email protected]', 'type' => 'email' ),
),
'resource_id' => 3,
);
$booking_options = array( 'save_booking_even_if_unavailable' => 1 );
$booking_id = wpbc_api_booking_add_new( $booking['dates'], $booking['data'], $booking['resource_id'], $booking_options );
Hope it’s will helpful for you.
Kind Regards.