Last active
August 29, 2015 14:05
-
-
Save barryhughes/937f519edb08e7abe6ff to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Updated the
$display_tickets
callback for compatibility with Eventbrite Tickets 3.9.6.