We've got a fairly long list of discount codes piling up. Many of them are specific to old events and are no longer used. Can I just delete them without affecting other data in the database?

  • do you have a backup / dev site you can test and report back?
    – petednz - fuzion
    Sep 20, 2017 at 21:21
  • Did you ever figure this out?
    – guyiac
    May 3, 2018 at 16:45
  • Sadly no. Got pushed on to the back burner, but still keen to hear of others' experience with this.
    – Graham
    May 6, 2018 at 9:55

1 Answer 1


I tested deleting a discount code with CiviCRM 5.2.1 and CiviDiscount 3.4

When deleting a discount code I saw this warning:

WARNING: Deleting this discount code (GMC610) will prevent users who have this code to avail of this discount. Do you want to continue?

After I deleted the code I searched for the contact id in the "cividiscount_track" table and the item was still there. However, it appears the code was removed from the "cividiscount_item" table as would be expected. So, it appears the code is removed from the list but the tracking data remains in the database.

I checked the Contributions in the contact record of the contributor before and after and I did not notice any changes.

It looks like the only thing that is removed in the contact record is on the 'Codes Redeemed' tab, you will no longer see the code in the CODE column. However you do see the date so you will know some type of code was redeemed.

In summary, it seems safe to delete discount codes as long as you don't mind losing the record of which code was used by a contact.

  • Doesn't CiviCRM add the name of the code to the line item being purchased when the code is applied? I imagine this could still be searched for?
    – Zachary
    Aug 6, 2018 at 19:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.