skip to Main Content

It is possible to add additional users to status change emails using the Email Notifications addon. This requires programming knowledge, and some understanding of the WordPress filters functionality.

To add users, you must implement a filter for upstream_email_status_change_to. You can either do this in an existing plugin, your theme’s functions.php file, or you can use a PHP plugin.

This article explains how to do it with a PHP plugin.

A basic email example

Before doing anything, you will need to install the PHP plugin. Note: be careful when you do this, as there are security implications to having such a plugin on your site.

We chose to use Code Snippets, which you can get here. After installing this plugin, you can go to Snippets -> Add New to create a new code snippet. This is where we will add the PHP code to implement the filter.

In the Enter title here field, enter a name for your snippet. This can be anything — just make it something understandable.

Then, in the Code box, enter the following:

add_filter('upstream_email_status_change_to', function($to, $item) {
   $to[] = 'me@mysite.com';
   return $to;
}, 10, 2);

Here is the page filled in:

Once you have entered the name of the snippet and the code, make sure to select Run snippet everywhere, and then click on the Save Changes and Activate button at the bottom.

Now, when you change the status of any item, you will get an email sent to me@mysite.com.

Connecting to the API

In order to perform more complicated tasks, you will need the API. With the API, you can perform functions like sending an email to a user based on a custom field in a project.

You can find a lot more information in the API documentation.

Related Articles