Documentation

Learn how to set up, customize, and expand the functionality of WooCommerce

Bookings Developer Docs


Documents

  • Add custom rows to the export form

    Use the woocommerce_bookings_export_row action to add fields to the Export Bookings options table. Any field added here should be paired with export-handling code that reads and validates the submitted value before changing export behavior. The snippet below adds one checkbox row and uses escaped, translatable label output for the field text.

  • Bookings REST API Reference

    The REST API Reference is targeted at WooCommerce Bookings 1.14.0+ only and written for developers looking to extend or customize WooCommerce Bookings. It requires an advanced understanding of PHP and WordPress development. Booking Slots Slots Properties Attribute Type Description product_ids string Product IDs for slots you want to query. (Comma-separated IDs) category_ids string Category IDs […]

  • Bookings Snippets: Tips and Tweaks

    In this document, you will find many useful snippets for customizing the functionality of WooCommerce Bookings. To use a snippet, you can copy the contained code into your child theme‘s functions.php file. Snippets Make calendar default to first available booking By default the current month will be shown on the Bookings calendar for performance reasons. […]

  • Bookings: Action and Filter reference

    Actions and filters listed on this page are specific to WooCommerce Bookings. Actions Available For Bookings The following table includes actions that you can use with WooCommerce Bookings. Action Args Description wc_bookings_updated   Fires after a new plugin version is installed. woocommerce_admin_booking_data_after_booking_details Int: Booking ID Fires after customer select box when viewing/editing a booking in […]

  • Change the number of rows processed per batch

    Use the woocommerce_bookings_import_batch_size filter to change how many rows the importer processes in each AJAX batch. Larger batches can finish faster, but they also use more memory and may be more likely to time out on constrained hosts. The snippet below sets the batch size to 50 while preserving the incoming value when it already […]

  • Change which booking statuses are exportable

    Use the woocommerce_bookings_export_statuses filter to control which booking post statuses are included in the export. By default, Bookings includes the statuses that are visible and relevant to admins, customers, and cancellation flows. The snippet below narrows the allowed set to confirmed and paid bookings, while still intersecting with the statuses Bookings made available.

  • Control how datetime offsets are handled

    Use the woocommerce_bookings_importer_timestamp_mode filter to choose how imported datetime offsets should be interpreted. The default mode, preserve_wall_clock, keeps the same clock reading from the CSV regardless of timezone differences. The snippet below switches that default to preserve_instant, which shifts the imported value to the destination site’s local equivalent of the same absolute moment.

  • Creating Bookings Programatically

    Bookings can be created programmatically using PHP, should you wish to create a follow-up booking or bookings from other plugins. The function you use is create_wc_booking. The create_wc_booking function Thecreate_wc_booking function takes the following arguments: create_wc_booking( $product_id, $new_booking_data = array(), $status = ‘confirmed’, $exact = false ) Booking Data Array The $new_booking_data argument is passed to […]

  • Exclude additional meta keys from the meta export

    Use the woocommerce_bookings_export_skip_meta_keys filter when the custom meta export should omit plugin-owned or internal fields. Core booking data-store keys, _edit_lock, and _edit_last are already excluded. The snippet below adds another private meta key to the skipped list for confirmed bookings and returns a de-duplicated key list.

  • Modify a booking object before it is saved

    Use the woocommerce_bookings_import_pre_save_booking_object filter to change the WC_Booking object after CSV data has been applied but before the importer saves it. This is useful for adding custom metadata or normalizing values that are not part of the default import fields. The snippet below records who imported a new booking and stores a source CSV ID […]

Use of your personal data
We and our partners process your personal data (such as browsing data, IP Addresses, cookie information, and other unique identifiers) based on your consent and/or our legitimate interest to optimize our website, marketing activities, and your user experience.