Custom Columns on Attendees List

Home Forums Ticket Products Event Tickets Plus Custom Columns on Attendees List

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1177647
    Tabytha Rourke
    Participant

    Good morning!

    We have some custom code in our theme to add additional data to the attendees table, but it seems to have stopped working after the 4.3 update. I can’t find anything suggesting that the code needs to change, but I’m not sure what is wrong with it.

    Here is the code we are using:

    add_filter( 'manage_tribe_events_page_tickets-attendees_columns', 'add_cof_custom_attendee_column', 100 );
    
    function add_cof_custom_attendee_column( $columns ) {
        unset($columns['purchaser_email']);
        unset($columns['purchaser_name']);
        unset($columns['order_status']);
        unset($columns['attendee_id']);
        unset($columns['security']);
        unset($columns['order_id']);
        unset($columns['cb']);
    
        $column_meta = array(
            'attendee_name'=>'Attendee Name',
            'status'=>'Status',
            'total' =>  'Total Paid'
        );
        $columns = array_slice( $columns, 0, 0, true ) + $column_meta + array_slice( $columns, 0, NULL, true );
        $column_meta = array(
            'purchaser_name'  =>  'Purchaser Name',
            'transaction_id'  =>  'Transaction ID',
        );
        $columns = array_slice( $columns, 0, 4, true ) + $column_meta + array_slice( $columns, 4, NULL, true );
        return $columns;
    }

    I have tried deactivating plugins, but the custom columns just won’t show up.

    #1178632
    Nico
    Member

    Hey Tabytha,

    Thanks for getting in touch!

    Some investigation lead to the fact that the filter name (for some reason I’m not sure about) it doesn’t get set with the same name anymore. Add this snippet next to the one you sent and it should make it right.

    /* Tribe, set the current screen id so the correct filters are set */
    function tribe_tickets_attendees_table_screen ( $args ) {
    $args['screen'] = 'tribe_events_page_tickets-attendees';
    return $args;
    }

    add_filter ( 'tribe_events_tickets_attendees_table_args', 'tribe_tickets_attendees_table_screen');

    Please let me know if it works and I’ll point this out to devs in that case,
    Best,
    Nico

    #1189680
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Custom Columns on Attendees List’ is closed to new replies.