Support

Home Forums Event Espresso Premium (USD) / ticket

(USD) / ticket

Posted: August 6, 2014 at 3:47 pm


Ashli

August 6, 2014 at 3:47 pm

Since the update on the Price of my events it shows (USD) / ticket. I want the word ticket either gone or to say something like each. I’ve inspected the element and put that into the quick localization plugin and it still shows up. Any idea on the exact words that go there so I can make this change?


Lorenzo Orlando Caum

  • Support Staff

August 6, 2014 at 7:30 pm

Hi Randall,

It needs an exact match so if there is a space before, then that will be needed for the match to work. On what page can we see this?


Lorenzo


Ashli

August 7, 2014 at 11:21 am

Lorenzo,

http://www.uspilotcar.com/events/phoenix-az/ this is a link to one event on our site, you can see the (USD) / ticket that I’m talking about next to the Qty.


Tony

  • Support Staff

August 7, 2014 at 11:44 am

Hi Randall,

In the quick localization plugin, use ” / ticket” as the original stringe.

This is the code used to translate that string, the full string between the single quotes must be translated.

__( ' / ticket', 'event_espresso' )

So in your new phrase you could use ” / each”.

Does that help?


Ashli

August 7, 2014 at 12:06 pm

Tony,

I tried to input that, and it doesn’t change anything.


Lorenzo Orlando Caum

  • Support Staff

August 7, 2014 at 2:42 pm

Hi,

Could you add this to your child theme’s functions.php file:

function ee_override_ticket_selector_messaging( $translated, $original, $domain ) {

    $strings = array(
        ' / ticket' => ' / each',
    );

    if ( isset( $strings[$original] ) ) {
        $translations = get_translations_for_domain( $domain );
        $translated = $translations->translate( $strings[$original] );
    }
 
    return $translated;
}
 
add_filter( 'gettext', 'ee_override_ticket_selector_messaging', 10, 3 );

Let us know if this works.


Lorenzo


Ashli

August 7, 2014 at 3:01 pm

Perfect! Thank you.


Lorenzo Orlando Caum

  • Support Staff

August 7, 2014 at 7:59 pm

You are welcome. If you need help with anything else just create a new support post.


Lorenzo

The support post ‘(USD) / ticket’ 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