Home Forums Event Espresso Premium Change FREE php to Complimentary

Change FREE php to Complimentary

Posted: December 4, 2018 at 7:41 am


December 4, 2018 at 7:41 am

I created my plugin to turn 0.00 to say free. Can I make it say Complimentary instead? What do I change in the code below?

function convert_zero_to_free( $amount, $return_raw ) {

if ( ! $return_raw || ! is_admin() ) {

$amount = $amount == 0 ? __( ‘free’, ‘event_espresso’ ) : $amount;

return $amount;
add_filter( ‘FHEE__EEH_Template__format_currency__amount’, ‘convert_zero_to_free’, 10, 2 );



  • Support Staff

December 4, 2018 at 9:07 am

Hi there,

__( ‘free’, ‘event_espresso’ )

to be
__( 'complementary', 'event_espresso' )

in the above should do what you are requesting.

The support post ‘Change FREE php to Complimentary’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: closed

Updated by  Tony 5 months, 3 weeks ago ago

Topic Tags


This topic is: not resolved
Do NOT follow this link or you will be banned from the site!