Support

Home Forums Event Espresso Premium EE4 Edit yellow text box when selecting invoice option for payment

EE4 Edit yellow text box when selecting invoice option for payment

Posted: March 20, 2014 at 10:01 am


Dominic Jerams

March 20, 2014 at 10:01 am

http://ieec.co.uk/event-test-page/

When you click on the invoice button, the following text comes up ‘You have selected “Invoice” as your method of Payment. I would like to edit the text in the yellow box that comes up under that text ‘After finalizing your registration, you will be transferred to the payment overview where you can download your invoice’. Is this possible?

Hope you can help


Lorenzo Orlando Caum

  • Support Staff

March 20, 2014 at 10:32 am

Hi,

function replace_invoice_message($content)
{
$content = str_replace('After finalizing your registration, you will be transferred to the payment overview where you can download your invoice.', 'MYNEWPHRASE',$content);
return $content;
}
add_filter('the_content','replace_invoice_message');

The above code can go into your theme’s functions.php file or a custom plugin. Be sure to update “MYNEWPHRASE” to something else.


Lorenzo


Dominic Jerams

March 26, 2014 at 5:59 am

Hi

I tried this on Friday but only just got back to responding now, I added the information above to the functions.php file for the theme in use and the text still comes up unchanged, can you advise?

http://cl.ly/image/1o3u0G0v3I1N


Josh

  • Support Staff

March 26, 2014 at 5:45 pm

It looks like the default priority of 10 is too early in this case, so you can try 11 like this:

add_filter('the_content','replace_invoice_message', 11 );

If that doesn’t work, and it may be more bullet-proof anyway, you can use a function that makes use of the gettext filter instead of the_content filter. This tutorial has some example code that includes a function that uses the gettext filter:

https://eventespresso.com/wiki/how-to-change-wording-with-poedit/


Dominic Jerams

March 27, 2014 at 4:48 am

I took you advice and its doing what was requested.

Thanks for the help!

The support post ‘EE4 Edit yellow text box when selecting invoice option for payment’ 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