Add button above attendee table in woocommerce tickets

Home Forums Ticket Products Event Tickets Plus Add button above attendee table in woocommerce tickets

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1027629
    Erico
    Participant

    I’ve been looking through the plugin code for about a day now trying to figure out how to add a button next to the “export” button above the attendee table. The problem I’m having is doing this without modifying the plugin code.

    Typically you could use the add_action( ‘views_{screen-id}’) wordpress function on WP_List_Tables, but it doesn’t seem to like the screen id “tribe_events_page_tickets-attendees”. After looking in the plugin, I’m wondering if the extra_tablenav function used for the attendee table class is overwriting the ability to use this standard function.

    I’ve tried copying the file into my theme and modifying it, but the plugin doesn’t seem to register it.

    Is this kind of modification possible or not? I’ve read many times how this feature uses WP_List_Table – and it appears that it does, yet for some reason I cannot use standard WP_List_Table functions for the plugin. Any help is appreciated.

    #1028137
    Nico
    Member

    Hi Erico,

    Thanks for reaching out! Interesting question here 🙂

    Hopefully this is possible by adding a filter to tribe_events_tickets_attendees_table_nav like shown below:


    add_filter( 'tribe_events_tickets_attendees_table_nav', 'attendees_table_add_button', 10, 2 );

    function attendees_table_add_button ( $nav, $which ) {

    $nav['left']['extra'] = sprintf( '%s', esc_url( 'http://tri.be/' ), 'Extra' );

    return $nav;
    }

    Please try the snippet out and let me know if it works for you,
    Best,
    Nico

    #1075709
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Add button above attendee table in woocommerce tickets’ is closed to new replies.