Carol Stambaugh

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • in reply to: Leaving stock blank doesn’t work – same issue #1150796
    Carol Stambaugh
    Participant

    This reply is private.

    in reply to: Add new column to Attendee table #1118859
    Carol Stambaugh
    Participant

    Thanks George! With your help we were able to accomplish what we needed. Here’s what worked for us in case it helps someone else:

    add_filter( 'manage_tribe_events_page_tickets-attendees_columns', 'add_my_custom_attendee_column', 20 );
    add_filter( 'tribe_events_tickets_attendees_table_column', 'populate_my_custom_attendee_column', 10, 3 );
     
    function add_my_custom_attendee_column( $columns ) {
        $columns['custom_id'] = 'Attendee Name';
        return $columns;
    }
     
    function populate_my_custom_attendee_column( $existing, $item, $column ) {
        if ( 'custom_id' !== $column ) return $existing;
        $meta_data = get_post_meta( $item['attendee_id'], Tribe__Tickets_Plus__Meta::META_KEY, true );
        return esc_html( $meta_data['athletes-name'] );
    }
Viewing 2 posts - 1 through 2 (of 2 total)