Support

Home Forums Event Espresso Premium Editing text in Multi Event Payment Page

Editing text in Multi Event Payment Page

Posted: June 25, 2013 at 5:30 pm

Viewing 10 reply threads


Lauren Pothof

June 25, 2013 at 5:30 pm

Hi I need to edit a line in the text for the Multi Event Payment Overview section. Where can I find the code? I can’t see it within payment_page.php nor the Mult_registration page files??? Many thanks in advance.


Dean

June 25, 2013 at 11:27 pm

Hi Lauren,

There are two good ways to change the wording

1) Translate it with Poedit – https://eventespresso.com/wiki/how-to-change-wording-with-poedit/

2) Translate it with a function – http://www.viper007bond.com/2011/07/13/changing-core-wordpress-strings/

 


Lauren Pothof

June 26, 2013 at 4:44 am

ok so when I wanted to edit the general payment page I just went in to payment_page.php and added some copy under the “payment overview” heading. I had assumed there is a similar file for the payment page that comes up when you add something to cart… is that not the case? I actually think it would be easier to edit the file if I knew which one to edit than use one of these solutions.


Dean

June 26, 2013 at 5:09 am

Hi,

No problem you can do it that way too. Can you advise the specific text you want changing and I’ll find you the file/s.


Lauren Pothof

June 26, 2013 at 5:27 am

Hi Dean, it’s the text below the “payment overview” heading that begins Your registration is not complete until payment is received. On the regular payment page is has a class of “instruct” if that helps. Cheers!


Dean

June 26, 2013 at 5:51 am

Hi,

That text string is found in event-espresso/templates/payment_page.php, approx. line 38


Lauren Pothof

June 26, 2013 at 4:40 pm

Hi Dean, that is the location of the text that appears for the general registration page. However if you use the multi registration plugin and select “add to cart” a slightly different payment overview appears as it also displays the content of the cart – this is the one I can’t seem to locate. Cheers


Josh

  • Support Staff

June 26, 2013 at 5:58 pm

Hi Lauren,

What is the exact text string you are looking to change?


Lauren Pothof

June 26, 2013 at 6:24 pm

Hi Josh, as per above it says “Your registration is not complete until payment is received” – it appears on this page when adding to cart …./event-registration/?page_id=3561&regevent_action=post_multi_attendee
This is the same text as what appears on the payment page if you just hit “register” however it doesn’t seem to be located in payment_page.php as I have changed that text but the changes don’t show up in both locations.


Josh

  • Support Staff

June 26, 2013 at 6:58 pm

The other one is in add_attendees_to_db.php on like 724. I’m afraid if you change it there, you will lose your changes the next time you update. So you might consider adding this to your theme’s function.php file and it will change it for both places. Plus, you will not need to worry about losing your changes on the next update:

function my_ee_filter_gettext( $translated, $original, $domain ) {
 
    // This is an array of original strings
    // and what they should be replaced with
    $strings = array(
        'Your registration is not complete until payment is received' => 'Your custom message here', 
        // You can 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', 'my_ee_filter_gettext', 10, 3 );


Lauren Pothof

June 26, 2013 at 11:17 pm

Thanks Josh, that should do the trick!

Viewing 10 reply threads

The support post ‘Editing text in Multi Event Payment Page’ 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