No results found. Try again with different words?

Search must be at least 3 characters.

Add additional notification emails

Sometimes it’s useful to have more than just project members and administrators to project receive notifications. The best way to do this is to add additional emails using the ph_project_emails filter. This filter runs for both mockup and website project actions (comments, approvals, etc) right before it sends the email. 

Here’s an example on how to use the filter. You would place this code in your theme or child theme’s functions.php file. In this example, we are subscribe all users with the Project Administrator role to get mockup and website updates via email:

<?php
/**
 * Add additional emails for project actions
 */
function wp_987_add_emails_from_role( $emails = array() ) {
  
    // get users with a specific role
	$users = get_users( array(
		// can also be project_editor, project_collaborator, project_client or a combo
		'role__in' => array( 'project_admin' ) 
	) );
	
	// add each user to the email list
	foreach ( $users as $user ) {
		$emails[] = $user->user_email;	
	}
	
	
	return $emails;
}
add_filter( 'ph_project_emails', 'wp_987_add_emails_from_role' );

Was this article helpful?


Did not find a solution? We are here to help you succeed.

Add additional notification emails

Sometimes it’s useful to have more than just project members and administrators to project receive notifications. The best way to do this is to add additional emails using the ph_project_emails filter. This filter runs for both mockup and website project actions (comments, approvals, etc) right before it sends the email. 

Here’s an example on how to use the filter. You would place this code in your theme or child theme’s functions.php file. In this example, we are subscribe all users with the Project Administrator role to get mockup and website updates via email:

<?php
/**
 * Add additional emails for project actions
 */
function wp_987_add_emails_from_role( $emails = array() ) {
  
    // get users with a specific role
	$users = get_users( array(
		// can also be project_editor, project_collaborator, project_client or a combo
		'role__in' => array( 'project_admin' ) 
	) );
	
	// add each user to the email list
	foreach ( $users as $user ) {
		$emails[] = $user->user_email;	
	}
	
	
	return $emails;
}
add_filter( 'ph_project_emails', 'wp_987_add_emails_from_role' );

Leave a Reply

Your email address will not be published. Required fields are marked *

LET’S GET STARTED

Ready to Give It a Try?

Start Your Free 14-Day Trial Now. No Obligation. No Reason Not To.

Trial Icon

14 Days Free Trial

Experience Our Platform Risk-Free

Docs Icon

Documentation

Articles that cover common questions

24/7 World Class Support Team

Friendly Support

Reach Out – We’re Here to Help

Scroll to Top