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.

add_filter(
	'woocommerce_bookings_export_row_data',
	function ( array $row, WC_Booking $booking ): array {
		if ( isset( $row['status'] ) ) {
			$row['status'] = strtoupper( (string) $row['status'] );
		}

		$row['booking_id'] = $booking->get_id();

		return $row;
	},
	10,
	2
);
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.