Skip to:
Content
Pages
Categories
Search
Top
Bottom

Disable group invite notifications


  • Maxaud
    Participant

    @maxaud

    How can I completely disable group invite notifications bypassing the users setting?

    Delete function? where?

    Thanks in advance.

Viewing 3 replies - 1 through 3 (of 3 total)

  • Burt Adsit
    Participant

    @burtadsit

    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.


    Maxaud
    Participant

    @maxaud

    burtadsit,

    Thanks for the reply.

    Does this actually send the email out to the user getting the request?

    Thanks.

    Dustin


    Burt Adsit
    Participant

    @burtadsit

    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.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Disable group invite notifications’ is closed to new replies.
Skip to toolbar