If a discount only applies to pricesets, then events can sometimes offer the discount even when they shouldn't
- In a stock demo install, configure a discount for the supporter $5 pricefieldvalue in the "help support civicrm" priceset. Leave everything else except the mandatory fields blank.
- Note that this is pricefieldvalue 3 in the db.
- Visit event id 3, the rainforest tournament. The discount box is showing. It shouldn't be.
I'm not a heavy user of the extension and not familiar with the code, but these lines don't seem to make sense: It looks like they compare the event id to a pricefieldvalue (what it calls price set ids seem to be pricefieldvalues).
$ids = _cividiscount_get_discounted_priceset_ids();
if (!empty($ids)) {
if (in_array($formHelper->getEventID(), $ids)) {
$addDiscountField = TRUE;