Donken Sellers – List events and view Ticket Attendees

Home Forums Ticket Products Event Tickets Plus Donken Sellers – List events and view Ticket Attendees

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #992531
    Thomas
    Participant

    Hi there, I have community events setup so other sellers can effectively list events, I approve and list the tickets as the administrator.

    How do I therefore enable people with Sellers status in Donken to view the attendees list?

    Without been able to access the admin area of the site can I add exceptions specific sellers status?

    #992748
    Nico
    Member

    Hi Thomas,

    Thanks for reaching out to us! Interesting question you ask!

    First of all I must say there’s no built-in way of achieving something like this so this is a customization. Which I can help you getting started with, but you’ll surely need to code a bit too. I think the best way to achieve this is to add the attendees list to the event page, and only showed to the allowed users.

    Below you’ll find a basic function to get attendees names by event ID, paste that into your functions.php file – located at wp-content/themes/your_theme/ – so you can use it inside your event template:


    function get_event_attendees ( $event_id ) {

    $attendees = array();

    if ( class_exists( 'Tribe__Events__Tickets__Woo__Main' ) ) {

    $woo_tickets = new Tribe__Events__Tickets__Woo__Main ();

    $attendees_query = new WP_Query( array(
    'posts_per_page' => - 1,
    'post_type' => $woo_tickets->attendee_object,
    'meta_key' => $woo_tickets->atendee_event_key,
    'meta_value' => $event_id,
    'orderby' => 'ID',
    'order' => 'DESC',
    ) );

    if ( $attendees_query->have_posts() ) {

    foreach ( $attendees_query->posts as $attendee ) {
    $order_id = get_post_meta( $attendee->ID, $woo_tickets->atendee_order_key, true );
    $attendees[] = get_post_meta( $order_id, '_billing_first_name', true ) . ' ' . get_post_meta( $order_id, '_billing_last_name', true );
    }
    }

    }

    return $attendees;
    }

    This functions is based on the get_attendees method of the WooTickets Class -located at wp-content/plugins/WooTickets/src/Tribe/Main.php:807- you might want to check that code in depth if you want to customize the function above. Do you think you can handle to include this function and output the results in the template? If you think not, let me know and I’ll craft instructions for that also.

    How do I therefore enable people with Sellers status in Donken to view the attendees list?

    Not sure what you mean by ‘Sellers status in Donken’, Can you clarify that for me?

    Please let me know abut this follow-up questions,
    Best,
    Nico

    #996929
    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 ‘Donken Sellers – List events and view Ticket Attendees’ is closed to new replies.