WordPress filter hook
tribe_display_tickets_left_threshold
Fired by 3 WordPress plugins, running on 91K+ sites between them.
“Overwrites the threshold to display "# tickets left".”
How to use tribe_display_tickets_left_threshold
It's a filter: your callback receives the value and 2 more arguments, and must return the (changed) value.
Add this to your theme's functions.php or a small custom plugin:
add_filter( 'tribe_display_tickets_left_threshold', function( $threshold, $data, $event_id ) {
// Change $threshold here.
return $threshold;
}, 10, 3 );Argument names come from Event Tickets and Registration's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
3 plugins that fire tribe_display_tickets_left_threshold
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
Event Tickets and Registration90,000+ installs
apply_filters( 'tribe_display_tickets_left_threshold', $threshold, $data, $event_id )src/template-tags/tickets.php:263 -
Events Slider, Events Carousel, Events Grid, Events Timeline and Events Filter Bar for The Events Calendar400+ installs
apply_filters( 'tribe_display_tickets_left_threshold', $threshold, $data, $event_id )src/Frontend/Helpers/EventfulFunctions.php:1145 -
Eventful for Elementor200+ installs
apply_filters( 'tribe_display_tickets_left_threshold', $threshold, $data, $post_id )src/Frontend/Helpers/EventfulForElementorPremade.php:652
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.