Reply To: Muliple recipients in fep_shortcode_new_message_form shortcode


Home Forums Front End PM PRO Muliple recipients in fep_shortcode_new_message_form shortcode Reply To: Muliple recipients in fep_shortcode_new_message_form shortcode

#10031
shamim
Keymaster

You can add following code in your theme’s (child theme’s if any) functions.php

add_filter('fep_filter_message_before_send', function( $message ){
    $your_extra_user_ids = array( 1,2,3 );

    //Only for parent message
    if( empty($message['post_parent'] ) ){
        if( ! is_array( $message['message_to_id'] ) ){
            $message['message_to_id'] = array( $message['message_to_id'] );
        }
        $message['message_to_id'] = array_merge( $message['message_to_id'], $your_extra_user_ids );
    }
    return $message;
});