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
function my_wootickets_tribe_get_cost( $cost, $postId, $withCurrencySymbol ) { | |
if ( empty($cost) && class_exists('TribeWooTickets') ) { | |
// see if the event has tickets associated with it | |
$wootickets = TribeWooTickets::get_instance(); | |
$ticket_ids = $wootickets->get_Tickets_ids( $postId ); | |
if ( empty($ticket_ids) ) { | |
return ''; | |
} | |
// see if any tickets remain, and what price range they have |
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
add_filter( 'tribe_get_cost', 'gum_wootickets_tribe_get_cost', 10, 3 ); | |
function gum_wootickets_tribe_get_cost( $cost, $postId, $withCurrencySymbol ) { | |
if ( empty($cost) && class_exists('TribeWooTickets') ) { | |
// see if the event has tickets associated with it | |
$wootickets = TribeWooTickets::get_instance(); | |
$ticket_ids = $wootickets->get_Tickets_ids( $postId ); | |
if ( empty($ticket_ids) ) { | |
return ''; |