Help Center
How to Cancel Booking with the WooCommerce Bookings Endpoint

How to Cancel Booking with the WooCommerce Bookings Endpoint

This tutorial explains how to allow users to cancel their bookings from the WooCommerce My Account page. Display the booking list on the My Account page, and set the cancellation deadline with the JetBooking and WooCommerce plugins.

Before you start, check the tutorial requirements:

The JetBooking WordPress plugin allows for the creation of booking and rental websites.

It also integrates with the WooCommerce plugin, enabling you to display the booking list on the My Account page, set a cancellation deadline, and allow users to cancel reservations.

Things to know

This functionality does not depend on the Booking mode set in the WordPress Dashboard > Bookings > Settings > General tab. That means you can work either with “Plain” or “WooCommerce based” mode. If you work with the “Plain” Booking mode, you can keep the WooCommerce integration toggle disabled.

Enable Booking Cancelation Functionality

Go to the WordPress Dashboard > Bookings > Settings > Advanced tab, scroll down to the Booking cancellation toggle, and activate it to allow customers to cancel bookings after they have been reserved.

It turns on the Cancellation deadline option, where you can specify an available cancellation time. Be aware that the number field’s value cannot be less than “1,” and a refund will not be sent automatically.

For example, we set “1” and “Week(s)” values, so users cannot cancel bookings if there is less than one week before the check-in.

booking cancelation settings

Make Bookings

On the front end, open a Single Post page with a booking form and submit one or several bookings for testing.

submitting the booking form on the single post page

Open Bookings on the My Account Page

Proceed to this tutorial to learn How to Create My Account Page With Endpoint Templates using the WooCommerce, JetWooBuilder, and JetThemeCore (optional) plugins.

Open the My Account page with endpoints on the front end. 

With the WooCommerce and JetBooking plugins installed and activated, the Bookings endpoint tab will be available in the menu.

bookings tab in the account menu

This tab shows the past, today’s, and upcoming bookings.

Warning

The current functionality will work correctly only for bookings created after the 3.3.0 JetBooking plugin version.

bookings list on the my account page

Here, users can check such info:

  • ID — shows the booking ID;
  • Instance — shows the name of the booked post with a link to its Single page; 
  • Order — shows the order ID. If this order was created using WooCommerce, it will be displayed as a link that directs the user to the corresponding order on the My Account page;
  • Check In and Check Out dates — date format can be changed in WordPress Dashboard > Settings > General > Date Format;
  • Status — shows the booking status.

The last column presents the “CANCEL” button. Depending on the Cancellation deadline option settings, it will be shown or hidden.

For example, we set a one-week deadline, so the bookings with check-in dates of 7 and 10 August aren’t available for cancellation (today is August 7).

Clicking the “CANCEL” button triggers a “Are you sure you want to cancel your booking?” pop-up. To continue the cancellation process, we hit the “OK” button.

booking cancellation pop-up

Besides the cancellation, the “CANCEL” button also redirects the user to the My Account page, where the “Your booking was cancelled.” message shows up. 

your booking was cancelled message

When we open the Booking tab again, we can see that the first booking from the Upcoming Bookings obtained the “cancelled” Status.

booking with the cancelled status

That’s all. Now you know how to allow users to cancel their bookings using the booking cancellation URL from the My Account page using the JetBooking and WooCommerce plugins on your WordPress website.

Was this article helpful?
YesNo

Need help?

Ask Facebook community

Get answers from 22K Crocoblock Community experts from all over the world.

Start a live chat

Ask question to support agent and share its details via chat messages.