Support » Plugin: The Events Calendar » Eventbrite broken for non-US customers

  • The Eventbrite integration has a couple really annoying bugs if you’re not a US customer. It always sets your tickets to sell in USD, and whenever you click a link in the editor to take you to the event details, the link they give you frequently just takes you to an Eventbrite login page instead of the actual event detail page.

    I’ve been chasing The Events Calendar to fix these bugs for a year and a half. The fixes are simple, and I’ve pointed them to the exact lines of code that need to change, but they don’t seem interested in fixing them.

    If you’re having trouble with their Eventbrite integration, here’s what you need to fix:

    To make it use the correct currency:
    src/Tribe/Sync/Event.php -> change ‘USD’ currency to your locale-specific currency (eg ‘CAD’)
    src/Tribe/Sync/Tickets.php -> change ‘USD’ currency to your locale-specific currency (eg ‘CAD’)

    To allow Eventbrite to remember your login information when you click links in the event editor:
    src/views/eventbrite/eventbrite-events-table.php -> change all instances of ‘eventbrite.com’ to your locale-specific domain (eg ‘eventbrite.ca’)

    Unfortunately, until The Events Calendar actually integrates this, you’ll have to re-patch these files every time they release an update.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor GeoffBel

    (@geoffbel)

    Hey @skrapion,

    I am sorry to hear you had a disappointing experience with the locale in Eventbrite Tickets. The good news is that we do have an extension to help you work around the locale limitations: https://theeventscalendar.com/extensions/eventbrite-additional-options/

    Let us know how that goes 🙂

    Best regards,
    Geoff B.

    That’s the first thing I did. That’s why I started digging into the code to fix it myself.

    Plugin Contributor GeoffBel

    (@geoffbel)

    @skrapion

    Thank you for writing back.

    Just to make sure I understand correctly, are you saying that the extension does not fix your issue? If that’s the case, we definitely will look into that.

    Plugin Support tribalmike

    (@tribalmike)

    @skrapion

    Try using this snippet in your active theme’s functions.php file and see if it resolves the issue:

    add_filter('tribe_eb_api_sync_event', function($args){
        $locale = tribe_get_option( 'tribe_ext_eventbrite_opts_locale' );
        if(!empty($locale) && $locale !== 'en_US' && isset($args['event.tickets']) && is_array($args['event.tickets']) && count($args['event.tickets']) > 0){
            $locale_currencies = array('es_AR' => 'ARS', 'en_AU' => 'AUD', 'pt_BR' => 'BRL', 'en_CA' => 'CAD',
                'fr_CA' => 'CAD', 'de_DE' => 'EUR', 'es_ES' => 'EUR', 'fr_FR' => 'EUR', 'en_HK' => 'HKD',
                'en_IE' => 'EUR', 'it_IT' => 'EUR', 'nl_NL' => 'EUR', 'en_NZ' => 'NZD', 'pt_PT' => 'EUR',
                'en_SG' => 'SGD', 'en_GB' => 'GBP', 'en_US' => 'USD');
            $currency = $locale_currencies[ $locale ];
            foreach($args['event.tickets'] as $x => $ticket){
                $args['event.tickets'][$x]['ticket_class.cost'] = str_replace('USD', $currency, $ticket['ticket_class.cost']);
            }
        }
        return $args;
    });

    Let me know.

    Plugin Support tribalmike

    (@tribalmike)

    P.S. Keep the Eventbrite Additional Options Extension activated.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this review.