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

Support Multisite Installations [Discussion] #33

Open andrewlimaza opened 2 years ago

andrewlimaza commented 2 years ago

Describe the bug The custom roles created on the main site, shows up on the subsite. For example level 3 custom role on main site, shows on subsite which only has level 1 and 2. Should we have a filter to disable this or handle it better as there may be more conflicts when it comes to 'overlapping' membership ID's.

To Reproduce Steps to reproduce the behavior:

  1. Install the Roles for Membership Add On individually on the main site and a subsite.
  2. Create more level's on the main site than on the subsite. (i.e. 3 levels on main site, 2 levels on subsite - or even just make sure there is no overlapping ID's between the sites for this test).
  3. Navigate to your subsite level settings and click edit, have a look at the role selector and notice roles from the main site showing up.

This is for sites that run PMPro individually on each site in the network (Do not use the Multisite Membership Add On for these tests).

Screenshots

Screen Shot 2021-11-18 at 15 38 36

In the above screenshot on the subsite, the "NEW!" (pmpro_role_2) level is on the main site and not the subsite.

Expected behavior This needs more discussion, but should we isolate roles based on the site ID instead of registering the roles across all sites?

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