Skip to content

Cookbook › Easy Digital Downloads · Integration

Create a discount code

Easy Digital Downloads2 minutesChangesTested 25 Oct 2026
Paste into ChatGPT or ClaudeCreate an active 20% Easy Digital Downloads discount code WEEKEND20, starting today and expiring Sunday 1 November 2026 at 23:59:59 in the store’s timezone. Read the WordPress timezone first. If that code already exists, show it instead of creating a duplicate. Verify the saved UTC dates against local time.

Changes content or settings on your site. See the recipe below for approval requirements. Read only cannot make changes.

  1. Your assistant reads the store’s timezone and checks whether the code exists.
  2. It creates the requested active discount, or shows the existing code without duplicating it.
  3. It reads the saved discount and converts the UTC timestamps back to store local time to verify the dates.
  • Choose your own code, percentage and future expiry date.
  • Enable AI write access under Downloads → Tools → AI first. At Standard, creating the discount requires WordPress approval.
  • Easy Digital Downloads stores discount timestamps in UTC and treats the end date as the last second of that date in the store’s timezone.
  • An existing code is shown as saved; it is not automatically changed to match your request.

Need a variation of this recipe, or a different one? Request a recipe