Limited time discount Book Smarter This Christmas
Up to 50%Off

How can I use WordPress hooks for exports in Amelia

Amelia provides several hooks related to CSV exports, allowing you to modify exported data before it is written to the CSV file. These hooks are triggered for each exported row and help you customize export content without modifying core plugin files.

Info Note

Hooks require programming knowledge, and support is limited to general guidance.

Export appointments

How do I modify appointment data before it is exported?

amelia_before_csv_export_appointments

Type: filter

Use this filter to modify appointment data before it is exported to CSV. The filter is called for each exported row.

				
					function example($row, $appointment, $separate)
{
    // change row data
    // $separate defines whether group appointments are exported in separate rows
    return $row;
}

add_filter('amelia_before_csv_export_appointments', 'example', 10, 3);
				
			

Export event attendees

How do I modify event attendee data before it is exported?

amelia_before_csv_export_event

Type: filter

Use this filter to modify event attendee data before it is exported to CSV. The filter is called for each exported row.

				
					function example($row, $event, $separate)
{
    // change row data
    // $separate defines whether group bookings are exported in separate rows
    return $row;
}

add_filter('amelia_before_csv_export_event', 'example', 10, 3);
				
			

Export customers

How do I modify customer data before it is exported?

amelia_before_csv_export_customers

Type: filter

Use this filter to modify customer data before it is exported to CSV. The filter is called for each exported row.

				
					function example($row, $customer)
{
    // change row data
    return $row;
}

add_filter('amelia_before_csv_export_customers', 'example', 10, 2);
				
			

Export payments

How do I modify payment data before it is exported?

amelia_before_csv_export_payments

Type: filter

Use this filter to modify payment data before it is exported to CSV. The filter is called for each exported row.

				
					function example($row, $payment)
{
    // change row data
    return $row;
}

add_filter('amelia_before_csv_export_payments', 'example', 10, 2);
				
			

Export coupons

How do I modify coupon data before it is exported?

amelia_before_csv_export_coupons

Type: filter

Use this filter to modify coupon data before it is exported to CSV. The filter is called for each exported row.

				
					function example($row, $coupon)
{
    // change row data
    return $row;
}

add_filter('amelia_before_csv_export_coupons', 'example', 10, 2);