Having looked at the code, the solution is to change lines 811 and 812 of /includes/classes/class-wp2fa.php to the following:
$subject = wp_strip_all_tags( self::replace_email_strings(self::get_wp2fa_email_templates( $email_id . '_email_subject' ) ) );
$message = wpautop( self::replace_email_strings(self::get_wp2fa_email_templates( $email_id . '_email_body' ), $user_id ) );
Additions in italics
Thank you for trying our plugin @squarestar
I can confirm that the email templates work right out of the box and tags are working properly. So the issue is something specific to your setup.
Can you please answer the below questions so we can troubleshoot your issue?
- What version of the plugin, WordPress and PHP are you running?
- Does this apply to all tags or some particular tags?
- Did you try all emails or some of them?
- Is the problem with the actual emails being sent by the plugins or the test emails? The tags are not replaced in the test emails.
Looking forward to hearing from you.
Thanks Robert – the email templates work under normal operation but the test emails that get sent when you’re setting the plugin up don’t get run through the replace_email_strings() method. It gives the impression that the feature is broken.
I made the changes to the plugin that I indicated in my second message above and it fixed the issue. It’s a much better experience when testing to see the correct values in the test emails.
Thank you for the clarification @squarestar
Indeed, it makes sense to have them fully functional also in the test so we’ll add that in the next update.
By the way, please do not forget to spare a minute to rate our plugin and service. These reviews are really helpful.
Also, should you have any other questions, please do not hesitate to ask.
Have a great day.
Hello @squarestar
We have just released update 2.5.0 of the plugin which includes this fix. So basically now test emails will also be populated with the right details.
Thank you for your suggestion. Please do not forget to spare a minute to rate our plugin and service. Thanks in advance.
Have a great day.