Groups paypal integration with standard wp roles

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?


Comments

3 responses to “Groups paypal integration with standard wp roles”

  1. SOFT DESIGNS Avatar
    SOFT DESIGNS

    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” ?

    1. 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. 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

Share