Groups paypal integration with standard wp roles

Posted in

Hi – We recently purchased Groups PayPal – Great product 🙂

Now trying to integrate with Groups PayPal with Standard WP User Roles.

From your GitHub: https://github.com/itthinx/groups

“Groups is light-weight and offers an easy user interface, while it acts as a framework and integrates standard WordPress capabilities and application-specific capabilities along with an extensive API.”

Question: For example – If a user PayPal subscription transaction is successful, they are automatically added to our “Pro” group, which currently works great. Now, within the same transaction, how can the user be automatically added to the standard WP “Authors” user role? How to make this kind of integration work correctly?

3 Responses to Groups paypal integration with standard wp roles

  1. SOFT DESIGNS August 25, 2020 at 9:28 pm #

    Hi – We recently purchased Groups PayPal – Great product 🙂

    Stable and responsive product support means everything in this business, so thanks for your fast reply!

    Yes, we are familiar with code hooks, and we can write the necessary WP Code you describe above, no worry. We just need to confirm the correct Group API Hooks below:

    That is great news that we can “hook” into “groups_created_user_group” API action. This API action should cover our need for “adding” the user to a WP UserRole at the same time they are “added” to a “Group”.

    To confirm, also when a user is “deleted” from a Group, I assume we can use the “groups_deleted_user_group” API action, and code a hook to “remove” a user from a WP UserRole at the same time they are “removed” from a “Group” ?

    • Kento September 21, 2020 at 11:58 am #

      Hi there!

      Please excuse the delayed reply, I completely missed this. Yes exactly, you can use those two to trigger the appropriate addition or removal from the corresponding roles.

      Cheers

  2. Kento August 25, 2020 at 12:14 pm #

    Hi,

    Thanks for using our software and great to hear that you like it!

    The groups_created_user_group action can be used to implement the role assignment that you want to execute when a user has been added.

    So basically, although Groups and the extension are not intended to do any role assignments, you can implement a function hooked on this action, that will do the role assignment when a user has been added to a group.

    Cheers

We use cookies to optimize your experience on our site and assume you're OK with that if you stay.
OK, hide this message.

Affiliates · Contact · Jobs · Terms & Conditions · Privacy Policy · Documentation · Downloads · Useful Plugins · My Account

Share