Support » Plugin: GiveWP - Donation Plugin and Fundraising Platform » Multi-language Notification Emails

  • Resolved champdor


    I develop a multi-language site (EN + HU). The site’s base language is Hungarian. I’d like to send out emails based on what language the form was used in.

    I managed to change the New Donation Receipt email language as per this snippet.

    The problem is that I read in give/includes/admin/emails/class-donation-receipt-email.php that the ‘give_donation_receipt’ filter will be depracated soon. A couple of rows below I see the new ‘give_{$this->config[‘id’]}_get_email_message’ filter but I don’t know how to use it—this is the end of my PHP knowledge.

    Of course I will need all the email noticifation filters to modify the language of them based on form ID, like:

    • Offline Donation Instructions
    • User Registration Information
    • Renewal Receipt Email
    • Subscription Cancelled Email
    • Subscription Completed Email
    • maybe Subscription Reminder Email

    It would nice to have all the message filters for them. Can anybody help in this?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Ravinder Kumar


    @champdor As you can see this is dynamic filter ‘give_{$this->config[‘id’]}_get_email_message’. where string inside {} will be replaced by email notification id. Each email notification in Give core must have a unique ID.

    You will find ID of email notification in there class under init() function. Use filters under get_email_message function to override message on bases of the custom condition.
    ref: https://github.c

    For example:
    New offline email notification registered with includes/admin/emails/class-new-offline-donation-email.php. Email notification Id is new-offline-donation and you will find this in init() function, so filter name will be ‘give_new-offline-donation_get_email_message’.

    Let me know if you need more information.

    Plugin Contributor Ravinder Kumar


    @champdor This is link to email notification classes:

    Thank you the detailed info, I will get to the work soon!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Multi-language Notification Emails’ is closed to new replies.