Support

Home Forums Event Espresso Premium Proceed to Paiement

Proceed to Paiement

Posted: April 24, 2014 at 9:16 pm

Viewing 1 reply thread


Nicolas Landry

April 24, 2014 at 9:16 pm

How can I change the Proceed to Paiement button to my language?


Dean

April 25, 2014 at 1:45 am

Hi,

Right now you will need to use code to change it.

add_filter ('FHEE__EED_Single_Page_Checkout__registration_checkout__button_text__proceed_to', 'my_custom_checkout_button');

function my_custom_checkout_button() {
    return 'This is some text';
}
function mycustom_filter_gettext( $translated, $original, $domain ) {

    // This is an array of original strings
    // and what they should be replaced with
    $strings = array(
        'Payment%sOptions' => ' Some more text'
        // 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 );

For the last part, the translation files should also be fine to use, you just need to look for Payment%sOptions rather than Payment Options.

Viewing 1 reply thread

The support post ‘Proceed to Paiement’ 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