Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?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

This comment has been minimized.

Copy link
Owner Author

@barryhughes barryhughes commented May 29, 2015

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