User documentation

⌘K
  1. Home
  2. User documentation
  3. Prices and Credits
  4. Display customers booking passes list on the frontend

Display customers booking passes list on the frontend

After creating, or selling with WooCommerce, some booking passes, your customers should be able to find them to check their balance, expiration date, copy their redemption code, etc. You can display their booking passes list very simply using a shortcode:

  • 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_passes] wherever you want on this page
  • Go to this page on the frontend and the connected user’s booking passes 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_passes] shortcode has a lot of attributes allowing you to filter the displayed booking passes:

Attribute Expected value
user_id The desired user ID (integer), current, or all.
Default: current.
active Filter inactive passes (allowed values: 0, 1, ou both).
Default: 1 (active passes only).
expired Filter expired (allowed values: 0, 1, ou both).
Default: both.
in__pass_template IDs of the booking pass templates (integers) (comma separated).
order_by Order the list by data (allowed values: id, pass_template_id, credits_current, credits_total, user_id, creation_date, expiration_date, events_from, events_to, active, redeem_code) (ordered and comma separated).
Default: id.
order Sorting order of the list (allowed values: asc or desc).
Default: desc.
columns Displayed columns (allowed values: id, pass_template_id, credits_current, credits_total, user_id, creation_date, expiration_date, events_from, events_to, active, redeem_code) (ordered and comma separated).
Default: id,title,redeem_code,credits,expiration_date,actions..

Here is an example how to use the attributes:
[bookingactivities_passes active="both" columns="title,redeem_code,credits,actions" order_by="active,id"]

Now, all that’s left is for your customers to make use of their booking passes!

How can we help?