Removing "Free" from Event Cost Range

If your event has RSVPs or free tickets in addition to paid tickets (say the most expensive ticket is $10), then the cost range for that event will show as "Free - $10" by default. In some cases, showing the event as potentially being free might not be ideal. You can remove "Free" from the cost by adding the following snippet to the functions.php file of your child theme:
function tribe_not_show_free ( $cost, $post_id, $with_currency_symbol ) {
	
	if ( $cost == 0 || $cost == 'Free' ) {
		$cost = str_replace('Free', '', $cost);
		$cost = str_replace(' - ', '', $cost);
	}
	return $cost;
}
add_filter ( 'tribe_get_cost', 'tribe_not_show_free', 10, 3 );

Plugins

Event Tickets, Event Tickets Plus

Notes

  • Originally written in May 2019
  • Tested with Event Tickets 4.10.5 and Event Tickets Plus 4.10.4
  • Author: Jennifer

Disclaimer

As with all of our recipes, please note that we share this in the hope it will be useful but without any guarantees or commitments. If you wish to use it, it is your responsibility to test it and adapt it to your needs (or find someone who can do so on your behalf). We are unable to provide further support in relation to this recipe.