Give’s Email Reports Add-on allows you to receive donation statistics for specific timespans directly in your inbox. Email Reports provides an easily digestible run down of your donation income and changes over time whereas per donation notifications can fill your inbox and cause distraction. The following will guide you through the setup, configuration, and customization of the plugin.

Add-on Install and Activation

To get started you will need to first have the Give plugin installed and activated. Next, you should download and activate the Add-on following these steps:

  1. Download the Add-on – When you purchase Email Reports from the Give website you will receive an email with a link to download your Add-on. If you don’t have the email you can always access your downloads from the My Account page on our site.
  2. How to Install and Activate the Add-on – Now that you have downloaded the plugin zip file it’s time to activate your plugin. The easiest way to do this is by logging into your WordPress website and navigating to Plugins > Add New > Upload Plugin and select the plugin file. This will upload the plugin, you should then activate it.

Note: You can always access your add-on purchase receipts, downloads, and licenses from your Give Account dashboard.

The Email Reports

Included within the plugin are three email reports that you may enable based on your requirements. Here is a screenshot of the daily and weekly email reports:

The Daily Email Report
The Daily Email Report
Weekly Email Report
The Weekly Email Report

Email Reports Settings

The settings screen is located in your WP-Admin under Donations > Settings > Emails > Email Reports. To enable each report you can toggle the scheduling fields using the “Report Frequency” checkboxes:

The Give Email Reports Settings
The Give Email Reports Settings

Scheduling Reports

Once you have toggled the reports you wish to receive you can then schedule them to be received at a certain day and time depending on the report. Once you schedule the report a WordPress Cron job is set up to handle scheduling the email send. The scheduling fields then become disabled and a “Reschedule” button appears. Click that button if you wish to clear the current schedule and adjust it to your requirements.

Report Email Recipients

By default, the reports will send to the emails listed in “Donation Notification Emails” field:

The Donation Notification Fields
The Donation Notification Fields

If you wish to customize the emails, we have provided the give_email_reports_recipients filter. This filter allows you to customize the email recipients using the following snippet:

/**
 * Customize the email report recipients.
 */
function my_custom_give_email_report_recipients($frequency){

   $email_report_recipients = array( 'johnny@nonprofit.org', 'gene@nonprofit.org', 'pete@nonprofit.org' );

   // This is an example of frequency based conditional email reports recipients. 
   // if($frequency == 'daily') {
        // Emails specific to daily frequency here.
        // $email_report_recipients = array( 'javier@gmail.com' ); 
   // }

   // Example of new emails for all frequencies:
   return $email_report_recipients;

}

add_filter('give_email_reports_recipients', 'my_custom_give_email_report_recipients', 10, 1);

To use this function first review How to Add Custom Functions to Your Site article and then customize the emails within the function’s array. You can use the commented conditional logic to send the various frequencies to different recipients.

Customizing the Reports

The various email reports (daily, weekly, monthly) are customizable and respect Give’s email templating system which allows you to modify the content of each email.

How to Customize the Reports

To customize the content of each report you will need some basic development knowledge in order to copy and adjust the template files to suit your needs.

To override the default template copy the appropriate template file from give-email-reports/templates/emails/body-report-daily.php to a new directory in your theme called my-theme/give/emails/body-report-daily.php

Overriding the default daily email report template
Overriding the default daily email report template

Now, any changes you make within the new template file are safe from being overwritten by plugin updates. You can add, remove, or make changes to the stats sent within the email in order to meet your requirements.