Create a Sale Discount Code in Easy Digital Downloads with AI
Describe the sale in a sentence and get a correctly configured discount code, created inactive so you can check it before customers can use it.
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. It is off by default.
I run my store on Easy Digital Downloads. Create a discount code for this sale: [describe it, for example: BLACKFRIDAY30, 30 percent off everything except my Podcast Launch Checklist, valid November 27 through November 30, maximum 200 uses, once per customer, minimum order of $20]. Use the Easy Digital Downloads discount abilities. First check whether a code with that name already exists, and if it does, stop and show it to me instead of making another. Look up any products I named so you use the right product IDs, and tell me if a name does not match anything. Before you create the code, show me every setting as a table and wait for me to confirm. Create it as inactive. After it is created, read it back from the store and show me that same table built from the saved data, including the start and end dates, and tell me if the dates are shown in UTC instead of my store's timezone. Do not activate it until I tell you to. When I do, activate it and confirm the status the store reports.
Skip pasting the full prompt. Drop this into your AI on a site that already has WPVibe:
Run the “Create a Sale Discount Code in Easy Digital Downloads with AI” recipe from the WPVibe cookbook on my connected site.
A sale code looks like one field and turns out to be ten: amount, type, start date, end date, maximum uses, minimum order, once per customer, products it needs, products it skips. Get the end date wrong and the code dies a day early, or lives on for a month quietly discounting every order. Most store owners set these up the night before a sale, which is exactly when mistakes get through.
You describe the sale and the AI builds the code through Easy Digital Downloads' own discount abilities, so the store validates every field the same way the admin screen does. The code is created inactive. You get a table of what was saved, read back from the store rather than from what the AI meant to send, and the code only goes live when you say so.
Paste the prompt with your sale details. Dates are in your store's timezone and the end date runs to the end of that day, so a sale that ends on the 30th is usable through the last minute of the 30th. The saved dates can come back in UTC, which makes them look a few hours off; that is a display difference and not a mistake. If you exclude products or require them, name them exactly as they appear in your store.
Outcome
A discount code with the amount, dates, usage limits, and product rules you described, sitting inactive until you approve it.