Created
October 7, 2016 20:24
-
-
Save GeoffEW/c1e4a2096b9af920b79cda20096ae486 to your computer and use it in GitHub Desktop.
Moves ticket form in a normal post type (page, post)
This file contains hidden or 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 | |
if ( class_exists('Tribe__Tickets_Plus__Commerce__WooCommerce__Main') ) { | |
// remove default action | |
remove_filter ( 'the_content', array( Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance(), 'front_end_tickets_form_in_content' ), 11 ); | |
function custom_front_end_tickets_form_in_content( $content ) { | |
$woo = Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance(); | |
$woo->front_end_tickets_form( $content ); | |
return $content; | |
} | |
// rehook a custom action | |
add_filter ( 'the_content', 'custom_front_end_tickets_form_in_content' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment