buddypress-group-email-subscription icon indicating copy to clipboard operation
buddypress-group-email-subscription copied to clipboard

How to disable mailing to all members in a specific group.

Open loyvis opened this issue 3 years ago • 2 comments

Hey, Great plugin. I need your help. How to disable mailing to all members in a specific group.

loyvis avatar Feb 13 '22 02:02 loyvis

There is a filter for this purpose:

add_filter(
  'bp_group_email_subscription_enable_email_notice',
  function( $retval ) {
    // A list of group IDs where the 'email notice' feature should be disabled
    $do_not_allow = [ 25, 68, 121 ];

    if ( in_array( bp_get_current_group_id(), $do_not_allow, true ) ) {
      $retval = false;
    }

     return $retval;
  }
);

boonebgorges avatar Feb 14 '22 17:02 boonebgorges

Thanks for helping. I will check it.

loyvis avatar Mar 01 '22 01:03 loyvis