Could anyone point me to examples or the appropriate filters to customize the CSV exports? I’ve searched for filters in the EE_Export.class.php and see a couple of filters, FHEE__EE_Export__report_registration_for_event and FHEE__EE_Export__report_registrations__reg_csv_array, but not sure how the arguments should be to use these in the functions.php file to apply_filters.
FHEE__EE_Export__report_registration_for_event will allow modification of the WP Query that gets the data.
FHEE__EE_Export__report_registrations__reg_csv_array looks like it allows modification to the data before it gets written to the CSV file.
I would advise running a test function that var_dump/print_r’s the variables and then you can see exactly what data is there.
function my_function($reg_csv_array, $reg_row) {
//do things with the variables
}
add_filter('FHEE__EE_Export__report_registrations__reg_csv_array', 'my_function', 10, 2);
Perfect, exactly what I was looking for, thank you! I am building a custom query on the wpdb as well and wanted to see if I could confirm how to tell if a registration is paid. Would that be when TXN_paid equals REG_final_price?
I think so yes. The STS_ID is changed to TCM once payment has been completed.
I’d start by taking a look at the files in /wp-content/plugins/event-espresso-core-reg/core/business as these should give you a better understanding of how things work.
/wp-content/plugins/event-espresso-core-reg/core/helpers/EEH_Activation.helper.php has a list of the Statuses at about line 852 (do NOT modify this file though!).
Screenshot of status codes: http://take.ms/JG5yv
Viewing 3 reply threads
The support post ‘Customizing CSV exports’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
If you would like help from the Event Espresso staff, then please purchase a support license right now so you can create a support topic in our premium support forums.