Change Email Recipient for "New Message" & "Quote" Emails

The new message and quote request email notifications from the plugin are dynamically generated (the recipient changes depending on who sends the email). By default, the admin receives these emails at the WordPress administration email address.

If you want to send these notifications to a different address (or to multiple addresses), you have two options depending on your plugin version.

Option 1: Built-in setting (Recommended) #

Starting with B2BKing Pro 5.5.70, you can go to B2BKing → Settings → Emails, choose the "New Message / Conversation" email, and edit the recipients under:

  • Admin Recipients for Messages — for new message notifications
  • Admin Recipients for Quotes — for new quote request notifications

You can enter multiple email addresses separated by commas if you want the notification to be delivered to several recipients (for example, the admin, a shop manager, and a sales address).

Option 2: PHP snippet #

If you are running a version older than 5.5.70, or if you need dynamic logic (for example, choosing the recipient based on the conversation ID), you can use the following PHP snippet instead:

add_filter('b2bking_recipient_new_message', function($recipient, $conversationid){
	return '[email protected]';
}, 10, 2);
add_filter('b2bking_recipient_new_message_quote', function($recipient, $conversationid){
	return '[email protected]';
}, 10, 2);

In the code above, you can change [email protected] to any email address you would like.

A PHP code snippet like the one above can be added to your child theme's functions.php or by following our guide here.

Powered by BetterDocs