Hi,
Is there a way to get the wp_user_id of the user who registered for an event based on ATT_ID?
I’m using the sample code provided in this forum to add custom columns to the CSV export file. If I can get the user_id, I can more easily pull the additional wp meta data I need for the registrant into the new column I’m creating.
Here’s a rough example of what I’m trying to accomplish:
add_filter( ‘FHEE__EE_Export__report_registrations__reg_csv_array’, ‘espresso_add_meta_value_csv’, 10, 2);
function espresso_add_meta_value_csv( $reg_csv_array, $reg_row ) {
// example: get the user’s faculty
$att_id = $reg_row[ ‘Attendee_CPT.ID’ ];
$registrant_user_id = _______________ **need help with this**
$user_info = get_userdata($registrant_user_id);
$faculty = $user_info->faculty;
Thank you – that solved it! Thanks for the super-fast response!
Viewing 2 reply threads
The support post ‘Get wp_userID from ATT_ID’ 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.
Support forum for Event Espresso 3 and Event Espresso 4.