gravityflow_network_non_site_user_notification

The gravityflow_network_non_site_user_notification filter allows enabling workflow notifications to be delivered to non-site users in a multi-site environment. 

Parameters

Parameter Type Definition
$to_add_user bool Indicates if a non-site user will receive notification for this step.
$user WP_User The user who is the assignee for the current step.
$notification array The notification properties.
$assignee_id integer The assignee ID - if applicable.
$entry array The current entry.
$step Gravity_Flow_Step The current step.

Examples

Example 1 - Fire workflow notification for Assignee "7", if assigned, even if he is not a site member. 

add_filter( 'gravityflow_network_non_site_user_notification', 'sh_gravityflow_network_non_site_user_notification', 10, 6 );
function sh_gravityflow_network_non_site_user_notification( $to_add_user, $user, $notification, $assignee_id, $entry, $step ) {
    if ( $assignee_id == 7 ) {
        $to_add_user = true;
    }
    return $to_add_user;
}

For notifications related to a user with the Super Admin capability, you would use either is_super_admin() or check for current_user_can( 'setup_network' ) capability.

Placement

This code should be placed in the functions.php file of your active theme or in a custom functions plugin.