Using Pricesets for memberships causes Discount Tracking to fail.
Created by: generalredneck
The following is not using any Priceset, but instead what you would find on the Contribution page Membership Section.
Notice that in this one, $membership_type is an array. This is because you can select more than one. With that said, how is usage going to be tracked on multiple memberships? Should it be per membership or per invoice. In this case I still only have 1 membership but could easily have 2 or 3. For now I'm going to create A PR that fixes it where if you have any of the memberships, it creates only one record.
This is an issue in 2.5 as well as master. See https://github.com/dlobo/org.civicrm.module.cividiscount/blob/master/cividiscount.php#L624