Is there PHP Function to check number rooms availabe by date range?
Viewing 2 reply threads
Viewing 2 reply threads
You must be logged in to reply to this topic. You can click here
Premium WordPress Themes, Plugins, SEO Friendly › Forums › WP Hotel Booking › Is there PHP Function to check number rooms availabe by date range?
Hello, is there PHP function to check available rooms based of date range?
Example: rooms_check_avavailable( $roomId, $check_in_date, $check_out_date );
// return numbers of available rooms (integer)
So I’m modified several codes to prevent multiple user book same room when click “Place Order” on Woocommerce checkout.
(because Hotel Booking cart session not syncrhonized with Woocommerce Cart session)
And I need this PHP function..
Thank you…
Dear eirudo,
This process is handled in the file wp-content/plugins/wp-hotel-booking/includes/rest-api/v1/frontend/class-wphb-rooms-controller.php
, function search_rooms( WP_REST_Request $request )
, line of code 58.
Best regards,
Daisy
Hello, thank you for your reply.
But it’s not what I’m looking for.
I want to search available of defined room by date ranges.
I need this to fixing bug on wp-hotel-booking-woocommerce
I just need simple function to search by Room ID, check in date, and checkout date to get available of room number.
Not all whole html template.
Dear eirudo,
The code snippet is exactly the one used to check the date in the search room form, we don’t support custom code instructions, so I can’t help you further.
Best regards,
Daisy
You must be logged in to reply to this topic. You can click here
Not a member yet? Sign up now