Skip to main content
Cookbook Maintenance Easy Digital Downloads

Clean Up Old Discount Codes in Easy Digital Downloads with AI

Find expired, unused, and forgotten discount codes, see which ones are still quietly active, and archive the rest with your approval.

Difficulty Beginner
Time ~10 min

Prerequisites

A connected site running Easy Digital Downloads 3.7.1 or newer on WordPress 6.9 or newer, with AI write access switched on under Downloads, Tools, AI.

The prompt
I run my store on Easy Digital Downloads and I want to clean up my discount codes. Use the Easy Digital Downloads discount abilities. First list every discount, including inactive, expired, and archived ones, paging through until you have them all. Do not change anything yet. Sort them into these groups and show each group as a table with code, name, amount, status, uses, and end date: expired codes, codes that have never been used, codes that have reached their maximum uses, and codes that are active with no end date. For the last group, tell me plainly that these codes work right now. Then ask me which groups or individual codes to archive, and wait for my answer. Archive only what I approve, by setting the status to archived, and leave everything else exactly as it is. Do not delete any discount unless I ask for that code by name, and if I do, tell me that deleting is permanent, only works on codes that were never used, and will ask for my approval in the browser. When you finish, list the discounts again and show me what changed.
Already connected?

Skip pasting the full prompt. Drop this into your AI on a site that already has WPVibe:

Run the “Clean Up Old Discount Codes in Easy Digital Downloads with AI” recipe from the WPVibe cookbook on my connected site.

Every sale leaves a code behind. After a couple of years the discounts screen is a mix of expired promotions, test codes someone made while setting up checkout, and one or two codes with no end date that still work and that you have forgotten you ever shared. The forgotten ones are the expensive ones: a 40 percent partner code from two years ago is still 40 percent off today.

The AI lists every discount through Easy Digital Downloads' discount abilities and sorts them into groups: expired, never used, maxed out, and active with no end date. It shows you the groups before it does anything. Then it archives what you approve. Archiving is the safe choice and the one this recipe defaults to, because it takes a code out of circulation and keeps its history. Deleting is permanent, Easy Digital Downloads only allows it for codes that were never used, and each delete asks for your approval in the browser.

Paste the prompt as it is. Read the open-ended active group slowly: those are live codes, and the right answer for some of them is to keep them. If a code was given to a partner or an affiliate, check with them before you switch it off. Nothing here touches past orders, so a code you archive still shows on the orders that used it.

Outcome

Your discount list holds only the codes you mean to keep, with old ones archived and any open-ended active codes flagged for a decision.