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

Fixes cases where the current user shows as the sponsored member for a parent #127

Closed JarrydLong closed 1 year ago

JarrydLong commented 1 year ago

When editing a sponsored member account where no discount code has been created for them, a list shows of the current user that may have created a discount code in the past but didn't use it.

This appears to have been caused by the discount code ID being empty, and still running a query to get discount codes, which then provides false results that don't belong with that user.

The fix for this comes from ticket #485557 mods only