Support

Home Forums Event Espresso Premium Editing paypal fields

Editing paypal fields

Posted: September 24, 2018 at 3:29 pm

Viewing 1 reply thread


Peyton Earey

September 24, 2018 at 3:29 pm

We are using PayPal pro and PayPal express on the website. Can we edit the field descriptions for the PayPal pro credit card fields? Specifically we would like to change the First Name and Last Name fields to Payor First Name and Payor Last Name.


Josh

  • Support Staff

September 25, 2018 at 9:38 am

Hi,
Those strings are translation-ready, so you can drop some code into a functions file that makes use of the gettext filter. e.g.

function pe_mycustom_filter_gettext( 
    $translated, 
    $original, 
    $domain 
) {
    $strings = array(
        'First Name' => 'Payor First Name',
        'Last Name' => 'Payor Last Name',
    );
    if ( isset( $strings[$original] ) ) {
        $translations = get_translations_for_domain( $domain );
        $translated = $translations->translate( $strings[$original] );
    }
    return $translated;
}
add_filter( 'gettext', 'pe_mycustom_filter_gettext', 10, 3 );
Viewing 1 reply thread

The support post ‘Editing paypal fields’ 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