Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- add_action( 'tribe_eb_after_event_creation', 'my_change_tribe_eventbrite_currency', 10, 4 );
- function my_change_tribe_eventbrite_currency( $eventbrite_id, $venue_id, $organizer_id, $post_id ) {
- // See http://www.currencysystem.com/codes/ for a list of three-letter
- // currency acronyms. Change the below variable to your preference.
- $currency_acro = 'EUR';
- $parameters = 'id=' . $eventbrite_id . '¤cy=' . $currency_acro;
- $success = Event_Tickets_PRO::sendEventBriteRequest( 'event_update', $parameters, $post_id, true, true, false );
- if ( !$success ) {
- add_filter( 'tribe_eb_error_message', 'my_change_tribe_eventbrite_currency_failed' );
- }
- }
- function my_change_tribe_eventbrite_currency_failed() {
- return 'Failed to update the currency.';
- }
Advertisement
Add Comment
Please, Sign In to add comment