When calendars are diplayed on your product pages or booking forms are displayed on your website, your customers are able to make bookings. Thus, they need to see their bookings list and perform some actions on them. Here is how:
- Go to the post / page where you want to display user’s bookings list in admin panel
- Tip: My account page of any subpage is a good choice
- Copy and paste this simple shortcode:
[bookingactivities_list]
wherever you want on this page - You can also display a calendar containing your customer’s bookings only. You just need to create a booking form with the calendar field only and to configure it to display events booked by the current user only, and past events. Then, paste its shortcode on your page.
- Go to this page on the frontend and the connected user’s bookings list appears
The user must be logged in and have at least one booking, else nothing would appear.
So it is recommended to display a login form on the same page, see this docs.
The [bookingactivities_list]
shortcode has a lot of attributes allowing you to filter the displayed bookings:
Attribute | Expected value |
---|---|
user_id |
The desired user ID (integer), current , or all .Default: current .You can also set an email address instead of an integer, in order to display the bookings made without account. |
per_page |
Number of rows to display per page (integer). Default: 10 . |
status |
Allowed booking statuses (allowed values: delivered , booked , pending , cancelled , refunded , refund_requested , in_cart , expired , removed ) (comma separated).Default: delivered,booked,pending,cancelled,refunded,refund_requested . |
payment_status |
Allowed booking payment statuses (allowed values: paid , due , none ) (comma separated). |
from |
Starting date (YYYY-MM-DD format, or a compatible relative format such as today or next monday ). |
to |
Ending date (YYYY-MM-DD format, or a compatible relative format such as +7 day or last day of this month ). |
order_by |
Order the list by data (allowed values: id , event_id , event_start , event_end , state , payment_status , creation_date , quantity , active , form_id , user_id ) (ordered and comma separated).Default: creation_date,id,event_start . |
order |
Sorting order of the list (allowed values: asc or desc ).Default: desc . |
templates |
Calendar ID(s) where the bookings must come from (integer) (comma separated). |
activities |
Activity ID(s) where the bookings must come from (integer) (comma separated). |
in__group_category_id |
Only booking groups from groups of events of these categories will be displayed. Group category ID(s) (integer) (comma separated). |
not_in__group_category_id |
Booking groups from groups of events of these categories won’t be displayed. Group category ID(s) (integer) (comma separated). |
in__form_id |
Form ID(s) where the bookings must come from (integer). |
not_in__form_id |
The bookings made with these forms won’t be displayed. Form ID(s) (integer) (comma separated). |
columns |
Displayed columns (allowed values: booking_id , status , payment_status , quantity , creation_date , events , event_id , event_title , start_date , end_date , template_id , template_title , activity_id , activity_title , form_id , order_id , actions , customer_id , customer_display_name , customer_first_name , customer_last_name , customer_email , customer_phone ) (ordered and comma separated).With WooCommerce : product_id , product_title With WooCommerce, Prices and Credits or Advanced Forms: price .With the Prices and Credits add-on: price_categories , booking_price , booking_price_in_credits , booking_pass_id , booking_pass_title .With the Advanced Forms add-on you can also use your custom fields name. With the Resource Availability add-on: resources , booking_resources , event_resources , resource_{id} where {id} is the resource ID.Default: booking_id,events,quantity,status,actions .Private data (last name, given name, email, phone…) will be hidden for confidentiality matters (see how to display private data). |
group_by |
booking_group to display one row per booking group instead of one row per booking (none ). Default: booking_group . |
login_form |
Form ID having a “Login / Registration” field (integer). This login / registration form will be displayed instead of the booking list if the user is not logged in. |
one_row_per_participant |
Requires Advanced Forms add-on. 1 to display one row for each participant instead of one row per booking (0 ).Default: 0 . |
Here is an example how to use the attributes: [bookingactivities_list per_page="20" templates="1,2,4" status="delivered,booked,pending" from="today" columns="booking_id,events,quantity,creation_date,status,actions"]
Some of the bookings may have available actions such as ‘Cancel’ or ‘Reschedule’. Indeed users can perform actions on their bookings depending on their state, and if you allow your customers to manage their bookings.