Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-sales domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the better-click-to-tweet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-amazon domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-stats domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Change VAT/Tax Number label to ABN | Event Espresso - Staging Server

Support

Home Forums Event Espresso Premium Change VAT/Tax Number label to ABN

Change VAT/Tax Number label to ABN

Posted: April 16, 2014 at 12:33 am

Viewing 4 reply threads


Jen Hanrahan

April 16, 2014 at 12:33 am

Hi – this is perhaps a suggestion or feature request. I would like to be able to edit the VAT/Tax Number label to say ABN (stands for Australian Business Number).


Josh

April 16, 2014 at 9:17 am

Hi Jen,

It turns out you can edit this without changing any of the code in Event Espresso core. The invoice template’s strings are all wrapped in translation functions, so here’s something you can add in a custom snippet plugin

function mycustom_filter_gettext( $translated, $original, $domain ) {
 
    // This is an array of original strings
    // and what they should be replaced with
    $strings = array(
        'VAT/Tax Number' => 'ABN',
        // Add some more strings here
    );
 
    // See if the current string is in the $strings array
    // If so, replace its translation
    if ( isset( $strings[$original] ) ) {
        // This accomplishes the same thing as __()
        // but without running it through the filter again
        $translations = &get_translations_for_domain( $domain );
        $translated = $translations->translate( $strings[$original] );
    }
 
    return $translated;
}
 
add_filter( 'gettext', 'mycustom_filter_gettext', 10, 3 );


Jen Hanrahan

April 22, 2014 at 8:24 pm

Can I add this to my theme functions.php file?


Jen Hanrahan

April 22, 2014 at 8:27 pm

Sorry I just read your link re: custom snippet plugin. Thanks for your help.


Lorenzo Orlando Caum

  • Support Staff

April 22, 2014 at 8:28 pm

Hello,

If your theme auto updates itself, then your customizations will be lost.

It would be best to add it through a custom plugin:

http://ottopress.com/2011/creating-a-site-specific-snippets-plugin/


Lorenzo

Viewing 4 reply threads

The support post ‘Change VAT/Tax Number label to ABN’ 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 - Staging Server