Skip to content

Instantly share code, notes, and snippets.

@barryhughes
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save barryhughes/937f519edb08e7abe6ff to your computer and use it in GitHub Desktop.
Save barryhughes/937f519edb08e7abe6ff to your computer and use it in GitHub Desktop.
<?php
/**
* Change the position of the Eventbrite Tickets ticket form (within single event pages).
*/
function change_eventbrite_ticket_position() {
// Do nothing if Eventbrite Tickets is not active
if ( ! class_exists( 'Event_Tickets_PRO' ) ) return;
// Get a reference to the callback method responsible for displaying the ticket form
$display_tickets = array( Event_Tickets_PRO::instance(), 'print_ticket_form' );
// First let's unhook it so it no longer displays in it's original position
remove_action( 'tribe_events_single_event_after_the_meta', $display_tickets , 9 );
// Now let's hook it up again, but we'll use a different action so it displays in a new position
add_action( 'tribe_events_single_event_before_the_content', $display_tickets );
}
add_action( 'init', 'change_eventbrite_ticket_position' );
@barryhughes
Copy link
Author

Updated the $display_tickets callback for compatibility with Eventbrite Tickets 3.9.6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment