Support

Home Forums Event Espresso Premium Add user meta to CSV

Add user meta to CSV

Posted: September 22, 2016 at 3:25 pm

Viewing 4 reply threads


Samantha

September 22, 2016 at 3:25 pm

I know how to add fields to the CSV, and I need to add some user meta, but I can’t seem to figure out how to get the user id in this context. Also, if I’m adding several, is there a better way than creating multiple hooks? It seems like it will be a drain on resources and it already takes around 5-6 minutes or so for the CSV to generate. Thanks 🙂


Josh

  • Support Staff

September 22, 2016 at 5:06 pm

You can use one single filter hook to add additional rows to the array, which is the
FHEE__EE_Export__report_registrations__reg_csv_array
filter hook.

If you look in Event Espresso’s source, you’ll see that the $reg_row value is passed to the hook, so you should be able to get the user ID from its relationship to the
$reg_row[ 'Attendee_CPT.ID' ] value.


Samantha

October 3, 2016 at 9:59 am

Just to clarify, Attendee_CPT.ID is the ATT_ID in wp_esp_registration and also what goes into the user meta for wp_EE_Attendee_ID ?


Josh

  • Support Staff

October 3, 2016 at 3:30 pm

Yeah it’s also the post ID of the Contact (or attendee) post in the wp_posts table.


Samantha

October 3, 2016 at 4:28 pm

Thank you, it worked brilliantly!!

Viewing 4 reply threads

The support post ‘Add user meta to CSV’ 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