Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save theeventscalendar/afe12bc6047b6e423b2a to your computer and use it in GitHub Desktop.
Save theeventscalendar/afe12bc6047b6e423b2a to your computer and use it in GitHub Desktop.
Allows customers to access the WooCommerce Tickets product page for tickets. See https://theeventscalendar.com/knowledgebase/selling-tickets-from-the-woocommerce-products-page/.
<?php
function wootix_no_hijack() {
if ( ! class_exists( 'Tribe__Events__Tickets__Woo__Main' ) ) return;
$woo_tickets = Tribe__Events__Tickets__Woo__Main::get_instance();
remove_filter( 'post_type_link', array( $woo_tickets, 'hijack_ticket_link' ), 10, 4 );
}
add_action( 'init', 'wootix_no_hijack' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment