Created
February 17, 2017 22:25
-
-
Save GeoffEW/a63180206b4ebb3a1f30511228816652 to your computer and use it in GitHub Desktop.
Advanced version of the remove free snippet
This file contains hidden or 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
<?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