Why Bokun Bookings Management?
Import Bokun to WP Ecommerce and Custom Fields gives tour and activity teams a first-class booking workspace in\ side WordPress. Fetch reservations via the Bokun API, enrich them with taxonomies and custom fields, and expose shortcodes so\ staff can trigger imports or review history without touching wp-admin.
Feature Highlights
Multiple API Credentials
Store, validate, and remove any number of Bokun API key and secret pairs. Each credential set becomes its own import context, making it easy to process bookings from multiple Bokun environments.
Progress-Aware Imports
Secure admin actions paginate through the Booking Search endpoint, saving bookings while reporting completion stats, errors, and queued contexts so teams know exactly where the import stands.
Dedicated Post Types
Bookings are stored as the bokun_booking post type with Booking Status, Product Tags, and Team Member taxonomies so you can filter data in WP Ecommerce, Elementor, or custom REST endpoints.
Dashboards & Shortcodes
Drop [bokun_booking_dashboard], [bokun_booking_history], or [bokun_fetch_button] onto any page. The plugin can even append the dashboard automatically to a selected page.
Rich Booking History
An accessible DataTable powers booking history views and CSV exports. Column filters, capability checks, and status grouping help admins audit every change.
Media Utilities
Trigger background tasks that import gallery images for each Product Tag taxonomy term so your customer-facing UI stays on brand.
Accessible Progress UI
ARIA-enabled progress bars and polite live regions inform staffers about import states whether they use the admin panel or the public fetch button.
Installation
- Download the plugin ZIP using the button above.
- Upload or clone the
bokun-bookings-managementfolder towp-content/plugins/. - Ensure the directory name matches the plugin slug so WordPress can read the header in
bokun-bookings-management.php. - Activate the plugin. On first run it creates the
wp_bokun_booking_historytable and redirects you to the settings screen.
Configure Credentials & Dashboards
- Navigate to Bokun Bookings Management → Settings.
- Add one or more API keys and secrets. Use the “Add another API” control to define multiple contexts.
- Select the page that should automatically display the booking dashboard or insert the shortcode manually.
- Use the Fetch Booking panel to test the import pipeline and watch real-time progress output.
- Run the optional Product Tag image importer when you need taxonomy media synced from Bokun.
Import Behavior
- Every credential set becomes a sequential import context (API 1, API 2, etc.).
- The plugin calls
/booking.json/booking-searchwith a default window from yesterday through one month ahead. Filterbokun_booking_items_per_pageto change pagination. - Bookings are stored as the
bokun_bookingpost type and forced topublishso future-dated reservations show up immediately. - Each create/update action is persisted to
wp_bokun_booking_historywith actor, source, and checked state metadata.
Shortcodes
| Shortcode | Purpose | Attributes |
|---|---|---|
[bokun_fetch_button] |
Renders a front-end button that triggers the importer plus the shared progress UI. | None. |
[bokun_booking_history] |
Outputs the booking history DataTable anywhere. | limit (default 100), capability (default manage_options), export (CSV filename slug). |
[bokun_booking_dashboard] |
Displays the dashboard cards, filters, and charts inside your selected page. | None. |
Admin Booking History
The plugin ships with a Booking History submenu that displays the most recent entries stored in wp_bokun_booking_history. Users can filter by action, status, actor, and source, plus download the visible dataset as CSV through DataTables Buttons and JSZip. The view gracefully handles missing tables (e.g., before activation) and respects capability checks.
Hooks & Filters
bokun_booking_items_per_page– Change how many bookings are pulled per API page (default 50).bokun_booking_request_timeout– Adjust the cURL timeout (default 300 seconds).bokun_booking_history_page_limit– Set how many rows display on the admin booking history page (default 100).bokun_txt_domain– Fired after the text domain loads so you can register additional strings.
Development Workflow
- Install the plugin in a local WordPress environment.
- Run
npm installandnpm run devinsideassets/if you extend the JavaScript/CSS helpers (current build is plain CSS/JS). - Use
wp i18n make-potto refresh translation files whenever you change user-facing strings. - Follow WordPress PHP coding standards and escape all output.
Troubleshooting
- Error: No API credentials available – Ensure at least one credential pair is saved; legacy single-key installs are migrated the next time you view the settings screen.
- Booking history table missing – Reactivate the plugin to trigger
dbDeltaand recreatewp_bokun_booking_history. - Imports timing out – Reduce the booking window or add filters to shrink payloads, and confirm the server can reach
api.bokun.io.
Need Help?
Email lab@websagesolutions.com with deployment questions, feature requests, or support needs.