-
-
Save joshfeck/150850af75a79932c533aec061868260 to your computer and use it in GitHub Desktop.
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
<?php | |
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file | |
function convert_zero_to_free( $amount, $return_raw ) { | |
if ( ! $return_raw || ! is_admin() ) { | |
if ( $amount == 0 && is_singular('espresso_events')) { | |
add_filter( | |
'FHEE__EE_Ticket_Selector__display_ticket_selector_submit__btn_text', | |
function(){return 'RSVP now';} | |
); | |
} | |
$amount = $amount == 0 ? 'No Cost' : $amount; | |
} | |
return $amount; | |
} | |
add_filter( 'FHEE__EEH_Template__format_currency__amount', 'convert_zero_to_free', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment