Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: [Resolved] Need a way to import messages without sending them

@shanebp

Moderator

>To import the messages we are using the bbpress function messages_new_message( $args )

That is a BP function.
In it, near the bottom, you will see:
do_action_ref_array( 'messages_message_sent', array( &$message ) );
That is the hook to send email if the member has that Setting set to Yes.

The function messages_message_sent is in:
\buddypress\bp-messages\bp-messages-notifications.php

So you could use do_action_ref_array hook with a priority < 10 and strip out the recipients.

Or you could try a remove_action on
add_action( 'messages_message_sent', 'messages_notification_new_message', 10 );

Skip to toolbar