How do I retrieve the status of a booking

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1020659
    James Woods
    Participant

    Hi, I would like to create a shortcode that retrieves the status of a booking (Confirmed, Cancelled, Abandoned, Pending Payment,….). I’ve looked at the word press tables and can’t seem to find a column or indicator to determine status. Can you please provide some insight on how to determine the booking status? similar to what is displayed when you view “All Bookings” from the Dashboard.

    Thanks

    #1021483
    Andre Flores
    Moderator

    Hello, James!

    Unfortunately, there is no option in the plugin to retrieve the booking status on the front-end. Could you provide some examples on how would you like to use it and how would it look like on the front-end?

    Regards,
    Andre

    #1021642
    James Woods
    Participant

    HI Andre, I have a page on my website that allows my guest to see their arrival and departure dates as well as other various “guest” specific information. I’d like to also show the booking status( Confirmed, Pending,…) . I’m pretty familiar with the booking data that is stored in the wp_postmeta table as I have already created a few PHP shortcodes myself to extract check in and check out dates.

    I do not see any meta data in wp_postmeta table that contains the booking status so I’m assuming the status is determined by the existence of other data stored in the wp_postmeta table. I’m not asking for the plugin to create a new shortcode for me… just let me know how the hotel plugin determines the status and I will get the data myself

    As a point of reference, from the WP Dashboard Plugin menu, When I look at “All Bookings” the second column is “Status”. That is the data I’m looking for.

    Thanks in advance

    #1022045
    Andre Flores
    Moderator

    Hello, James!

    Thank you for your detailed feedback, it is much appreciated. I have consulted with our developers and they informed me that booking statuses are stored in post_status column of the wp_posts table. I hope this helps.
    It would be also nice to see live result of what you have been able to achieve in regards of displaying guest booking information on front-end, I am sure many Hotel Booking users are interested in this as well.

    Regards,
    Andre

    #1022820
    James Woods
    Participant

    Hi Andre, thanks for the info on the booking status in the wp_posts table.

    I’ve created a guest specific page on my site that will only display their booking info. I’ve created a number of shortcodes that will retrieve their Check in / check out dates, as well as a few custom fields for things like the code for the electronic lock on the front door as an example. Obviously had to create a number of security measures as my guest will access this specific page via an email link that I send to them as there is no menu option on my site for this page unless they have come to the site via the email link that I have sent to them.

    #1022933
    Andre Flores
    Moderator

    Hello James,

    Thank you for sharing your experience, it is much appreciated. It is really great that you have been able to implement such a feature, it has been requested by some Hotel Booking users recently. We also do have this feature request in mind and consider it for future plugin updates.

    Regards,
    Andre

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.