Why does plugin not work for private events yet iFrame widget does?

Home Forums Ticket Products Eventbrite Tickets Why does plugin not work for private events yet iFrame widget does?

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1224228
    mhanz
    Participant

    Hi there,
    We purchased this plugin unfortunately without reading any of the forums prior only to discover the plugin does not display tickets for events that are marked as private.

    Is there some reason for this? The iFrame widget from eventbrite.com works without a problem for private events. Is it possible the plugin can also?

    #1224682
    Andras
    Keymaster

    Hello mhanz,

    Thanks for reaching out and sorry about the issue you are having. Let me try to help you with this.

    As a first I need some more information on this issue.

    Is the event marked private in Eventbrite, in your Events Calendar or both?

    Where were the tickets created originally? In Eventbrite or in The Events Calendar?

    Thanks for the clarification in advance. I’m looking forward to solving this with you.

    And if in the end you decide that this doesn’t work for you, we do have a 30-day refund policy. You can read more about that here: refund policy

    But I’m sure we’ll be able to solve this.

    Cheers,
    Andras

    #1224703
    mhanz
    Participant

    Hi Andras,

    Appreciate your reply. The event is live in Eventbrite and is marked as Private in Eventbrite so that it is not publicly available on the eventbrite website. This particular event was created first in Eventbrite and imported to WordPress via the plugin. We have also tried doing the other way around and creating first in WordPress.

    The event in wordpress (using Events Calendar & created with Eventbrite) is published, and also marked as live. Settings show that it is listed as private (see screenshot attached of event settings in wordpress dashboard).

    Link to event on wordpress site: http://mhanz.wordpress.zeald.com/event/eventbrite-test-2/

    Link to content page showing iFrame Widget of Tickets (iframe copied from Eventbrite dashboard and pasted into standard content page): http://mhanz.wordpress.zeald.com/about-us/style-guide/

    Link to event on Eventbrite: https://www.eventbrite.co.nz/e/eventbrite-test-2-tickets-31443606674

    Here is a link to an event created in wordpress: http://mhanz.wordpress.zeald.com/event/eventbrite-test/
    Eventbrite link to event created in wordpress: https://www.eventbrite.co.nz/e/eventbrite-test-tickets-31523699233

    We would prefer not to go down the refund track as we really like the rest of the service, but we do need these events to show up when marked as private in Eventbrite. We are hoping this is achieveable.

    Appreciate any assistance you can give us!

    • This reply was modified 7 years, 3 months ago by mhanz.
    #1224721
    mhanz
    Participant

    Hi Andras,

    Thank you for your reply.

    We have tried creating the events in both Eventbrite & WordPress. Both exhibit the same issue whereby when an event is marked private in Eventbrite, the ticket are produced by this plugin does not display.

    Here is a link to an event created in wordpress and published to eventbrite, the event is live in wordpress and eventbrite, but is set to private in eventbrite privacy settings (client does not want the event listed on eventbrite public listings): http://mhanz.wordpress.zeald.com/event/eventbrite-test/

    Here is another event created in Eventbrite and published to wordpress, the event is live and also set to private so it doesnt’ publicly display in eventbrite. http://mhanz.wordpress.zeald.com/event/eventbrite-test-2/

    Here is the same event (Eventbrite test 2) using the iframe widget from eventbrite: http://mhanz.wordpress.zeald.com/about-us/style-guide/

    We would prefer not to get a refund as we really like the rest of the features. But key to this is being able to have a private events, and have the plugin display these ticket areas (the iframe widget displays perfect, hoping the plugin can be updated also).

    I’ve also attached a screenshot of the event settings for “Eventbrite test 2”.

    Really appreciate any guidance you can give here.

    Best Regards,

    #1225234
    Andras
    Keymaster

    Hello mhanz,

    We had a discussion internally and here is the info I got:

    – The event is not listed publicly (per how the customer configured it on eventbrite.com)
    – This is one of several criteria we look at before deciding if we should render the iframe or not
    – Since it’s not listed publicly, we err on the side of safety and don’t show it
    – We don’t currently have filters in place to change this behaviour

    On the positive side, the developer quickly cooked up a snippet, which should render the iframe even when the event is set to private. Just paste this into your theme’s functions.php file:


    /* RENDER IFRAME EVEN WHEN EVENTBRITE EVENT IS SET TO PRIVATE */
    function eb_iframe_show_even_if_private() {
    $post_id = get_the_ID();
    $api = tribe( 'eventbrite.api' );
    $event = $api->get_event( $post_id );

    if ( ! $event ) {
    return;
    }

    $event_id = $event->id;

    $iframe_url = ( is_ssl() ? 'https://' : 'http://' ) . 'www.eventbrite.com/tickets-external?eid=%s&ref=etckt&v=2';
    $iframe_url = apply_filters( 'tribe_events_eb_iframe_url', sprintf( $iframe_url, $event_id ) );

    $html = '';

    if (
    ! empty( $event_id ) &&
    $api->is_live( $post_id ) &&
    tribe_event_show_tickets( $post_id )
    ) {
    $html = sprintf(
    '<div class="eventbrite-ticket-embed" style="width:100%%;text-align:left">
    <iframe id="eventbrite-tickets-%1$s" src="%2$s" style="height:200px;width:100%%;overflow:auto;"></iframe>
    <div style="font-family:Helvetica, Arial;font-size:10px;padding:5px 0 5px;margin:2px;width:100%%;text-align:left">
    Event registration
    <span style="color:#ddd"> powered by </span>
    Eventbrite
    </div>
    </div>', $event_id, $iframe_url );
    }

    $html = apply_filters( 'tribe_template_factory_debug', $html, 'Tribe__Events__Eventbrite__Template::the_tickets' );
    return apply_filters( 'tribe_events_eb_iframe_html', $html, $event_id, $post_id );
    }

    add_filter( 'tribe_events_eventbrite_the_tickets', 'eb_iframe_show_even_if_private' );

    Please check and let me know if this helps.

    Cheers,
    Andras

    #1226416
    mhanz
    Participant

    This reply is private.

    #1226708
    Andras
    Keymaster

    Hello mhanz,

    I’m happy to hear the snippet did the job.

    Thanks for the suggestion, when I was discussing this with one of the team members we actually touched on the topic of making this as an extension. Even if not part of the core, it might be released as an extension plugin in the future.

    I’m really sorry about the encoding. My bad, totally. TinyMCE always tricks me with this, I guess I should finally learn how to use it properly when pasting in code. 🙂 Apologies.

    Here is the code again in a gist, also for future users who might be looking for this:

    https://gist.github.com/andrasguseo/6cf7738e3e34348d7ca398fd7bcfb9eb

     

    Is there anything else on this topic I can help you with?

    Cheers,
    Andras

    #1226710
    mhanz
    Participant

    Hi Andras,

    That’s good to hear, also a good idea of adding it as an extension. Even the gist is very straight forward to do, even for someone not familiar with coding. But making it available to them and making them aware of it’s existence would no doubt go a long way.

    Thank you again for your help, much appreciated.

    Best.

    #1226713
    Andras
    Keymaster

    You’re very welcome, I’m happy I could be of help.

    Since the topic resolved I am going to close this ticket, but if you need anything else related to this topic or another please post a new one in the forum and we will be happy to help you out.

    Cheers,
    Andras

    PS: If you like our plugins, and you didn’t yet do so 🙂 we would be happy to receive a review in the wordpress.org repository. Thanks!
    https://wordpress.org/support/plugin/the-events-calendar/reviews/
    https://wordpress.org/support/plugin/event-tickets/reviews/

    PS2: We’d be also grateful if you would give us feedback on your satisfaction with support. Just click on one of the classy looking emojis below. 🙂 If you can spare a few words, that’s even better. Doublethanks!

     

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Why does plugin not work for private events yet iFrame widget does?’ is closed to new replies.