Documentation

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

Bookings Developer Docs


Documents

  • Modify the default column auto-mapping

    Use the woocommerce_bookings_csv_import_mapping_default_columns filter to adjust the importer’s automatic CSV header mapping. This is helpful when a source system exports a familiar value under a custom column label. The snippet below maps a header named My Start Column to the internal start field only when that header exists in the uploaded CSV.

  • Modify the default export columns

    Use the woocommerce_bookings_export_default_columns filter when the export needs a different set of columns than the defaults. The filter receives the full column map, where each key is the exported field ID and each value is the label shown in the generated CSV. The snippet below adds a custom column and removes the Google Calendar event […]

  • Modify the final column mapping

    Use the woocommerce_bookings_csv_import_mapped_columns filter after automatic mapping has finished and the importer has resolved the selected headers. This is the right place to make final mapping adjustments that depend on the raw uploaded headers. The snippet below maps My Custom Column to a custom internal field when that header appears in the CSV.

  • Modify the full row data before it is written

    Use the woocommerce_bookings_export_row_data filter when several columns need to be adjusted together before the CSV row is written. This is useful for row-level transformations, derived values, or normalizing values from multiple fields at the same time. The snippet below uppercases the exported status and adds the booking ID explicitly to the row data.

  • Modify the importer arguments

    Use the woocommerce_bookings_csv_importer_args filter to change the arguments passed into the importer constructor. This is useful when the default importer class is still correct, but one runtime option needs adjustment. The snippet below increases the number of parsed lines for the default importer class while leaving arguments unchanged for other importer classes.

  • Override the value of a specific column

    Use the woocommerce_bookings_export_column_{column_id} filter when one exported column needs custom output for each booking row. Replace {column_id} with the column key you want to control. The snippet below targets a custom field column, checks that the expected column is being processed, and falls back to the original value when no custom meta value is available.

  • Refine which bookings are fetched

    Use the woocommerce_bookings_export_query_args filter to adjust the query arguments passed to WC_Booking_Data_Store::get_booking_ids_by(). This lets a customization narrow or expand the bookings included before the export rows are built. The snippet below limits the export to bookings assigned to one resource ID, which can be adapted for resource-specific reporting.

  • Replace the importer class

    Use the woocommerce_bookings_csv_importer_class filter when a customization needs to replace the CSV importer with a class that extends WC_Bookings_Importer. This is a deeper extension point than changing mappings or batch size, so the replacement class should preserve the importer contract. The snippet below returns a custom importer class only when that class is available, otherwise […]

  • Run code after a booking is imported or updated

    Use the woocommerce_bookings_import_inserted_booking_object action to run follow-up logic after the importer has saved a booking. At this point the booking object has already been created or updated, so the hook is useful for logging, notifications, or syncing related systems. The snippet below writes a WooCommerce log entry that includes the booking ID, whether it was […]

  • WooCommerce Bookings Calendar CSS Style Elements

    If you want to change the color scheme of the WooCommerce Bookings calendar of the customer view, you can do so by modifying a few CSS styles. If you are using a block theme you can enter custom CSS in the site editor. CSS Styles Below are the CSS styles you can use to modify […]

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.