[Membership 2 Pro] "Send copy to Administrator" does not obey MS_ADMIN_CAPABILITY

We are using the Automated Email Responses in the latest Membership plugin. We also like sending a copy of certain emails to our support staff lead. Our support staff belong to the user role "Managers". We use define( "MS_ADMIN_CAPABILITY", "create_users" ); to give our "Managers" full access to the Membership plugin. That works great. Unfortunately at the time being "Send copy to Administrator" dropdown only shows the email to site admin (from Settings->General) and a list of users with the role "Administrator". This is because the MS_Model_Member::get_admin_user_emails() function only checks those users. It doesn't verify the MS_ADMIN_CAPABILITY.

This is problematic for us, as the support staff lead that we need to send copies of the emails to has the user role "Manager".

It would be very helpful if the get_admin_user_emails() function checked MS_ADMIN_CAPABILITY and if it was defined, also displayed emails for users that match that capability.

  • James Morris
    • WordPress Enthusiast

    Hello David @ BBS

    I hope you are well today.

    At present, it is not possible to add this functionality to Membership 2 Pro without a significant amount of custom coding. Though this does seem like a very useful feature. I'm going to go ahead and flag this as a Feature Request and notify our Dev Team of it. They will review this suggestion and if it is possible without causing issues with other parts of the plugin, they will consider it for future versions.

    Best regards,

    James Morris

  • Paul Kevin
    • Neo

    Hey there David @ BBS ,

    Hope you are well today. Unfortunately we cannot use capabilities in this case for admin user emails, but we can define a role in this case. Please find attached changes to the file ms-model-member.php that adds a new define called "MS_ADMIN_EMAIL_CAPABILITY" that allows you to set a role to be added to the list of admin emails. For example, to include the manager role users to the dropdown, all that is needed to be done in your wp-config.php file is

    define('MS_ADMIN_EMAIL_CAPABILITY', 'manager');

    This will be included in the next release.

    Warm Regards
    Paul Kevin

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.