Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
52 views
in Q2A Core by
What is the best way to override the text of emails, defined in qa-lang-emails.php? I'd like to do it in a way that isn't lost whenever a new version is installed, if possible.

Or, is there a better solution to the problem of users replying to the emails that tell them their question has been answered/commented, in the expectation that their reply will appear on the site?

The only simple answer seems to be an extra sentence at the start of the relevant emails.
Q2A version: 1.8.0

1 Answer

0 votes
by

Write a custom plugin where you override the function qa_lang(). Something like

function qa_lang($identifier) {
    if (substr($identifier, 0, 7) === 'emails/') {
        # your code here
        return ...
    } else {
        return qa_lang_base($identifier);
    }
}

...