strangerstudios / pmpro-sponsored-members

Generate a discount code for a main account holder to distribute to sponsored members.
https://www.paidmembershipspro.com/add-ons/pmpro-sponsored-members/
15 stars 27 forks source link

Function pmprosm_sponsored_account_change not working when Sponsor Changes Membership Level #113

Open kimwhite opened 2 years ago

kimwhite commented 2 years ago

Describe the bug When a SPONSOR changes from one sponsor level to another, the Discount Code is not changed to represent the changes in child membership it applies to.

To Reproduce

  1. Install Sponsored Members Add On.
  2. Create 4 Levels: SPONSOR 1, CHILD 1, SPONSOR 2, CHILD 2
  3. Add Code Snippet for the above levels to work.
  4. Check out for SPONSOR 1.
  5. Same User checkout for SPONSOR 2,
  6. Compare Sponsor Code Settings. Only seat amount changes. It should have changed to work for level 4, changes seats but not level for level 2.

Screenshots If applicable, please attach a screenshot to make your issue clearer.

Expected behavior Changing Sponsor Level should update Discount Code to new amount AND level it applies to.

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

WordPress Environment WordPress 6.0.1 Twenty Twenty Theme PMPro 2.9.2 Sponsored Members Add On .10