Posted: 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. |
|
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/
|
|
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. |
|
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. |
|
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! |
|
Hi, That text string is found in event-espresso/templates/payment_page.php, approx. line 38 |
|
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 |
Hi Lauren, What is the exact text string you are looking to change? |
|
|
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®event_action=post_multi_attendee |
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 ); |
|
|
Thanks Josh, that should do the trick! |
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.