Skip to content

Instantly share code, notes, and snippets.

@GeoffEW
Last active October 10, 2017 02:44
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 GeoffEW/09005c81be890a562def47b05ae7fe3b to your computer and use it in GitHub Desktop.
Save GeoffEW/09005c81be890a562def47b05ae7fe3b to your computer and use it in GitHub Desktop.
Moves tickets when used in a page (not an event)
<?php
function tribe_move_tickets_in_page ( ) {
if ( !class_exists('Tribe__Tickets_Plus__Commerce__WooCommerce__Main') ) return;
// remove default action
remove_action ( 'the_content', array ( Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance(), 'front_end_tickets_form_in_content' ) );
// remove default action
add_action ( 'the_post', array ( Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance(), 'front_end_tickets_form' ) );
}
tribe_move_tickets_in_page ();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment