Need to send an email to 2 addresses

In the Membership 2 plugin, when a new member pays for their membership, we need to have 2 email addresses receive the email. But the field where you put the address only allows one entry.

  • Ivan

    Hi randomblink !

    You can create MU plugin for that (for example, create {wordpress_folder}/wp-content/mu-plugins/wpmu_membershir2_add_recipients.php file via FTP) with the following code

    function wpmu_membershir2_add_recipients( $recipients, $obj, $subscription ) {
        if ( !empty( $obj->type ) && 'type_registration' === $obj->type ) {
            $recipients[] = '';
            $recipients[] = '';
        return array_unique( $recipients );
    add_filter( 'ms_model_communication_send_message_recipients', 'wpmu_membershir2_add_recipients', 10, 3 );

    Best regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.