Bulk-create discount codes for your store.
Step 2 maps your source columns to coupon fields: code, discount_type, coupon_amount, usage limits, and email restrictions.
- Seasonal promos (500 unique codes for a Black Friday campaign)
- VIP customer codes
- Bulk email marketing campaigns
- Restoring coupons from a backup
code (default) — The coupon codeid — WordPress post ID
| Column | Required | Example |
|---|
id | No | 42 (for updates) |
code | Yes | SUMMER25 |
description | No | 25% off summer collection |
discount_type | No (default fixed_cart) | percent, fixed_cart, fixed_product |
coupon_amount | Yes | 25 (percent or dollars) |
amount | Alternative to coupon_amount | 25 |
date_expires | No | 2026-12-31 23:59:59 |
| Type | What It Does |
|---|
percent | Percentage off total |
fixed_cart | Fixed amount off cart subtotal |
fixed_product | Fixed amount off each product |
| Column | Example |
|---|
usage_limit | 100 (total uses) |
usage_limit_per_user | 1 (per customer) |
limit_usage_to_x_items | 5 (only applies to first 5 items) |
usage_count | 42 (current usage, for migrations) |
| Column | Example |
|---|
minimum_amount | 50.00 |
maximum_amount | 500.00 |
| Column | Example |
|---|
free_shipping | 1 (yes) or 0 (no) |
| Column | Example |
|---|
exclude_sale_items | 1 or 0 |
individual_use | 1 (cannot combine with others) or 0 |
| Column | Example |
|---|
product_ids | 123,124,125 (comma-separated product IDs) |
excluded_product_ids | 200,201 |
product_categories | 5,10 (category IDs) |
excluded_product_categories | 99 |
| Column | Example |
|---|
customer_email | [email protected],*@company.com |
email_restrictions | Alternative name for same field |
Use *@domain.com for whole-domain restrictions.
code,description,discount_type,coupon_amount,minimum_amount,usage_limit,date_expires,free_shipping,individual_use,product_categories
SUMMER25,Summer sale 25% off,percent,25,50.00,1000,2026-09-30 23:59:59,0,1,5
SHIP10,$10 off shipping,fixed_cart,10,75.00,500,2026-12-31 23:59:59,1,0,
VIPFREE,VIP free shipping,percent,0,0,,2026-12-31 23:59:59,1,0,
Create 100 unique codes:
code,discount_type,coupon_amount,usage_limit_per_user
SAVE001,percent,10,1
SAVE002,percent,10,1
SAVE003,percent,10,1
code,discount_type,coupon_amount,date_expires
FLASH50,percent,50,2026-04-15 23:59:59
| Problem | Fix |
|---|
| Coupon created but not working | Check start/end dates, usage limits, and minimum spend |
| Wrong discount type | Values are case-sensitive: percent not Percent |
| Expired on creation | Check date_expires is in the future |
| Product restriction ignored | Use product_ids (numeric IDs) |
| Category restriction not working | product_categories must be IDs, not names |
The results screen shows how many codes were created, updated, or skipped — handy proof when you push a thousand unique Black Friday codes at once.