Skip to content

Instantly share code, notes, and snippets.

@GeoffEW
Created February 17, 2017 22:25
Show Gist options
  • Save GeoffEW/a63180206b4ebb3a1f30511228816652 to your computer and use it in GitHub Desktop.
Save GeoffEW/a63180206b4ebb3a1f30511228816652 to your computer and use it in GitHub Desktop.
Advanced version of the remove free snippet
<?php add_filter ( 'tribe_get_cost', 'tribe_not_show_free', 10, 3 );
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;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment