Free and Premium WordPress Plugins & Themes Forums WordPress Plugins Hotel Booking Fatal Error in Hotel Booking Plugin when adding past Reservations
- This topic has 1 reply, 1 voice, and was last updated 1 week, 6 days ago by
J. Davis.
- AuthorPosts
- March 5, 2025 at 2:52 am #1732488
Alberto
ParticipantIssue Overview:
Sometimes it can happen that you have to handle past reservation (eg: booked through another channel).
It seems that adding a reservation with past dates is causing a fatal error in the Hotel Booking plugin the WordPress site
To reproduce, start : /wp-admin/admin.php?page=mphb_add_new_booking
select today dates, then manually edit number dates with the keyboard, then try to save and the error below appears.The error message indicates that the function getAvailableRooms() expects a DateTime object but is receiving NULL, leading to a TypeError
( PS : to “J. Davis” :
Please do not reply eg: “There is no such option”. I know. I am a full member and if this functions does not exist yet it can be developed, that’s one of the point of having a forum , thank you )March 5, 2025 at 2:54 am #1736578J. Davis
KeymasterHi Alberto,
To add a booking in the past you need to add a booking for current or future dates and then edit it. Make sure there is a rate with a season price for the specific period in the past. - AuthorPosts
- You must be logged in to reply to this topic.