strangerstudios / pmpro-roles

Adds a custom WordPress Role for each membership level in Paid Memberships Pro
https://www.paidmembershipspro.com/add-ons/pmpro-roles/
GNU General Public License v2.0
17 stars 16 forks source link

Enhancement - Compatibility with BuddyPress (BuddyBoss) Registration. #35

Open kimwhite opened 2 years ago

kimwhite commented 2 years ago

Describe the bug When using the BuddyPress/Boss registrations form, Custom Roles are not assigned when using a snippet to add a default role .

To Reproduce Steps to reproduce the behavior:

  1. Website with BuddyPress/Boss
  2. Set up site to use BuddyPress registration.
  3. Set up the level to assign multiple roles
  4. Add snippet to assign default PMPro Level at registration
  5. Go through Registration Process
  6. Only the default role is added to users profile.

Screenshots

Screen Shot 2022-05-10 at 8 13 49 AM Screen Shot 2022-05-10 at 8 15 27 AM

Expected behavior Member should be assigned all roles for that level.

Isolating the problem (mark completed items with an [x]):

WordPress Environment

``` WordPress 5.9.3 PMPro 2.8 Roles Add On 1.4.1 ```
andrewlimaza commented 1 month ago

I waas able to replicate this, I believe the issue here is that BuddyPress/BuddyBoss is owning this. Same goes for the edit user profile page, it may update the user roles based on the submission of this data.

We would need to add compatibility for this, or run our code really really late (hopefully that's the simple fix).

The snippet here could be run regularly to assign roles to users/members in this scenario - https://github.com/strangerstudios/pmpro-roles/issues/8