Guest User

Untitled

a guest
Nov 11th, 2014
293
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.77 KB | None | 0 0
  1. <?php
  2.  
  3. add_action( 'tribe_eb_after_event_creation', 'my_change_tribe_eventbrite_currency', 10, 4 );
  4.  
  5. function my_change_tribe_eventbrite_currency( $eventbrite_id, $venue_id, $organizer_id, $post_id ) {
  6.     // See http://www.currencysystem.com/codes/ for a list of three-letter
  7.     // currency acronyms. Change the below variable to your preference.
  8.     $currency_acro = 'EUR';
  9.    
  10.     $parameters = 'id=' . $eventbrite_id . '&currency=' . $currency_acro;
  11.    
  12.     $success = Event_Tickets_PRO::sendEventBriteRequest( 'event_update', $parameters, $post_id, true, true, false );
  13.    
  14.     if ( !$success ) {
  15.         add_filter( 'tribe_eb_error_message', 'my_change_tribe_eventbrite_currency_failed' );
  16.     }
  17. }
  18.  
  19. function my_change_tribe_eventbrite_currency_failed() {
  20.     return 'Failed to update the currency.';
  21. }
Advertisement
Add Comment
Please, Sign In to add comment