this is my first request here.
I hope not to be off topic.

I have a problem.
Using the _e( function to get localized text, what I can do is the equivalent of an echo or print.

I don’t know how to get the result of an _e(… to pass it to a variable, so that I can both echo it on the screen and use it for other purposes, like creating an email subject, both localized.

I found this on TequilaFish.com

ob_start();
echo 'Hello World';
$myStr = ob_get_contents();
sob_end_clean();

I changed the echo line with _e( but it doesn’t work. Or maybe I made some mistakes.

I hope someone can help me. I guess it could be very useful for many users.
Thank you very much for any help.

Read more here: WordPress Plugin. How to pass a _e( content to a variable


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: