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 MMPU and WooCommerce #24

Closed andrewlimaza closed 3 years ago

andrewlimaza commented 3 years ago

Describe the bug Currently selling memberships through WooCommerce does not work correctly with Multiple Memberships Per User. This doesn't apply multiple roles but only one role when checking out.

To Reproduce Steps to reproduce the behavior:

  1. Purchase a WooCommerce product assigned to a level.
  2. Purchase another level via WooCommerce.
  3. The user only receives one role as per the last level purchased and not a combination thereof.

The 'user_change_level' function needs to be refactored a bit for this - https://github.com/strangerstudios/pmpro-roles/blob/dev/pmpro-roles.php#L159