Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
loyvis opened this issue Feb 13, 2022 · 2 comments
Open

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

loyvis opened this issue Feb 13, 2022 · 2 comments

Comments

@loyvis
Copy link

loyvis commented Feb 13, 2022

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

@boonebgorges
Copy link
Owner

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;
  }
);

@loyvis
Copy link
Author

loyvis commented Mar 1, 2022

Thanks for helping.
I will check it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants