Documentation

s2_admin_email

Subscribe2 can be configured to send an email to all Administrator level users every time a public subscriber subscriber or unsubscribes. You may want to send these emails but change the list of recipients. The ‘s2_admin_email’ makes that possible.

The hook takes two variables, the list of recipients in array form and the type of email being sent. You can amend the array or completely replace it. You can also carry out different actions for the two email types.

function my_admin_filter($recipients = array(), $email) {
    // $recipients is an array of admin email addresses
    // $email will be 'subscribe' or 'unsubscribe'
    if ($email == 'subscribe') {
        foreach ($recipients as $key => $email) {
            if ( $email == '[email protected]') {
                unset($recipients[$key]);
            }
        }
        $recipients[] = '[email protected]';
    }
    return $recipients;
}
add_filter('s2_admin_email', 'my_admin_filter', 10, 2);

How can we help?

Contact Us

Reach out to us for any inquiry

You must enter full name
You must enter email
You must enter message

We got your message

We will reply to you very soon :)