Automatically merge a MEMBERSHIP2-USERS-ROLLE with a WP-USER-ROLLE

Hi Guys

I tried to look through the forums but couldn't find an answer to it. It may sound simple however I don't really know how t solve this problem.

I am using the "Better Notifications For WordPress" to notify some of the users on every published post, but I can only select the WP-user-rolles or specific users manually.

So I don't know how to assign my MEMBERSHIP2-users automatically to a WP-USER-ROLLE or how to simply make the MEMBERSHIP2-USER-ROLLES visible in the wordpress-user-rolles.

If there is a more simple way to send emails on every new post to the MEMBERSHIP2-USERS than I am highly open to that solution.

Thank you in advance.

Your
Max

  • Adam Czajczyk

    Hello Max,

    I hope you're well today and thank you for your question!

    Becoming a member of a Membership 2 Pro members doesn't affect a WP user-role of user account. The default user-role on WordPress sites for newly registered members is usually a "Subscriber" role so if a new user registers on a site and signs up for a membership, that account is also assigned a "subscriber" user role.

    Also, if an existing member signs up for a membership, that user account keeps the user role that it already has. For example, if a user of an "editor" role signs up for one of the Membership 2 Pro memberships, that user is still an "editor".

    Therefore, if you send messages to all users of a selected role, all the users of that role should receive it, regardless whether they are Membership 2 Pro members or not.

    That'd be a bit different if you would want to send some e-mails/notifications only to the member that signed up for any membership but not other users of your site. The Membership 2 Pro plugin comes with "MailChimp" add on bundled-in and that can be used to automatically add members to selected MailChimp list which you may then use to message the members.

    If you would like to send messages only to the members of a selected membership, there would need to be some custom solution implemented. The Membership 2 Pro plugin includes an API that can be used to build your own code upon it and you will find its doc in plugin on "Membership 2 -> Help -> API Docs" page in your site's dashboard.

    That can be used for example to created an integration with your current mailing solution or to build a fully customized tool. It would however be a bit outside the scope of this forum to create such code so if you need it to be coded for you, you may want to ask a question on our "Jobs & Pros" job board (please note: no WPMU DEV staff involved!) here:

    https://premium.wpmudev.org/wordpress-development/

    If you however feel like coding it by yourself, take a look a Membership 2 Pro API docs that I mentioned above and in case you had any additional questions, don't hesitate to ask here.

    Best regards,
    Adam