maxaud, the function that does the work in bp is groups_send_invites() and it lives in bp-groups.php, line 1642.
function groups_send_invites( $group_obj ) {
global $bp;
This function serves both the group creation ‘send invites’ and the member theme ‘send invites’ in the group screen.
I’d put a return; statement right under that global $bp; statement. Users can flip all the switches they want but nothing will actually happen. The users will still see the capability but nothing will work.
Lemme test this to make sure…
No notification emails are actually sent. The screen says it did but it didn’t. The notification message “Group invites sent” isn’t part of that function you will be bypassing.
burtadsit,
Thanks for the reply.
Does this actually send the email out to the user getting the request?
Thanks.
Dustin
Nope. That function is the beginning of a series of things that happens. The function that actually send out the emails is: groups_notification_group_invites() in /mu-plugins/bp-groups/bp-groups-notifications.php
Let me guess, you want to disable it there? Line 261 of that function is:
wp_mail( $to, $subject, $message );
Comment that out and no group invite email will ever leave your box.