DiscountTrack item is created twice
Created by: wannesderoy
We encountered the following issue on our CiviCRM 5.13.4 and Drupal 8 platform:
When a user uses a discount code the discount is calculated correctly but in the backend the track item is inserted in the database twice. So in the contacts "codes redeemed' we see 2 identical records for a single use of a discount code.
I tried to find the source of the problem and it seems the cividiscount_civicrm_postProcess
hook is just triggered twice with the same class as parameter (CRM_Contribute_Form_Contribution_Confirm
). The discount code is still correct, but the track item is inserted twice.
Does anyone have any idea why this hook is triggered twice, I don't think this is or should be the default behavior of CiviCRM?