Skip to content

Instantly share code, notes, and snippets.

<?php
$count = 0;
echo '<ul>';
foreach ( $tickets as $ticket ) {
global $product;
$count++;
if ( class_exists( 'WC_Product_Simple' ) ) $product = new WC_Product_Simple( $ticket->ID );
else $product = new WC_Product( $ticket->ID );
<?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' );