Support

Home Forums Event Espresso Premium Change FREE php to Complimentary

Change FREE php to Complimentary

Posted: December 4, 2018 at 7:41 am

Viewing 1 reply thread


globaldisciples

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 );

Source: https://eventespresso.com/wiki/show-ticket-price-zero-free/


Tony

  • Support Staff

December 4, 2018 at 9:07 am

Hi there,

Changing
__( ‘free’, ‘event_espresso’ )

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

in the above should do what you are requesting.

Viewing 1 reply thread

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.

Event Espresso