Support

Home Forums Community Forum Customizing CSV exports

Customizing CSV exports

Posted: June 11, 2015 at 5:29 pm

Viewing 3 reply threads


Robert Fitzpatrick

June 11, 2015 at 5:29 pm

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.


Dean

June 12, 2015 at 12:50 am

Hi,

It depends on what you are trying to do.

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);


Robert Fitzpatrick

June 12, 2015 at 1:15 pm

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?


Dean

June 15, 2015 at 2:18 am

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.

Event Espresso