Coupon Import/Export
A powerful WordPress plugin for importing and exporting coupons via CSV files with support for multiple date formats, column aliases, taxonomies, and ACF custom fields.
by Furqan · github.com/furqanyasin/coupon-import-export-plugin · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/furqanyasin/coupon-import-export-plugin/archive/refs/heads/main.zipA powerful WordPress plugin for importing and exporting coupons via CSV files with support for multiple date formats, column aliases, taxonomies, and ACF custom fields.
Features
✅ CSV Import/Export - Bulk import and update coupons from CSV files
✅ Flexible Column Selection - Choose which fields to export
✅ Store Filtering - Export coupons by specific store
✅ Multiple Date Formats - Supports YYYYMMDD, DD/MM/YYYY, and YYYY-MM-DD
✅ Taxonomy Support - Handles both store categories and general categories
✅ ACF Integration - Full support for Advanced Custom Fields
✅ Auto-Create Terms - Automatically creates missing categories and stores
✅ Column Aliases - Flexible CSV headers (e.g., 'expiry' or 'expiration_date')
✅ Bulk Updates - Update existing coupons by including their ID
Installation
Method 1: Upload via WordPress Admin
- Download the plugin folder
- Zip the
coupon-import-export-pluginfolder - Go to WordPress Admin → Plugins → Add New → Upload Plugin
- Upload the zip file and click Install Now
- Click Activate Plugin
Method 2: Manual Installation
- Upload the
coupon-import-export-pluginfolder to/wp-content/plugins/ - Go to WordPress Admin → Plugins
- Find "Coupon Import/Export" and click Activate
Usage
Accessing the Plugin
After activation, go to WordPress Admin → Coupon IO
Exporting Coupons
-
Filter by Store (Optional)
- Select a store from the dropdown to export only that store's coupons
- Leave blank to export all coupons
-
Select Columns
- Check the columns you want to include in the export
- All columns are selected by default
-
Click "Export CSV"
- File will download automatically
- Filename format:
coupons-export-YYYY-MM-DD-HH-MM-SS.csv
Importing Coupons
-
Prepare Your CSV File
- Must include a header row
- Required column:
title - Recommended columns:
store,categories,coupon_type,coupon_code
-
Upload and Import
- Click Choose File and select your CSV
- Click Import CSV
- Wait for the success message
-
Review Results
- The plugin will show: Created, Updated, and Error counts
- Check your coupons to verify the import
CSV Format
Required Columns
title- Coupon title (required)
Optional Columns
| Column | Description | Example |
|---|---|---|
id |
Post ID (for updates) | 123 |
description |
Coupon description | Save 20% on all items |
store |
Store name(s) | Nike or Nike,Adidas |
categories |
Category name(s) | Clothing & Accessories,Women's Clothing |
coupon_type |
Type of coupon | Coupon, Deal |
coupon_code |
Coupon code | SAVE20 |
text_line_1 |
Discount text | 20% |
text_line_2 |
Discount text | Off |
affiliate_link |
Affiliate URL | https://example.com |
terms |
Terms & conditions | Valid until Dec 31 |
start_date |
Start date | 2025-01-01 |
expiration_date |
Expiration date | 2025-12-31 |
is_featured |
Featured flag | 1 or 0 |
status |
Post status | publish, draft, pending |
Column Aliases
The plugin supports flexible column names:
| Standard | Aliases |
|---|---|
expiration_date |
expiration, expiry, end_date |
start_date |
start, begin_date |
is_featured |
featured, is_feature, feature |
coupon_type |
type |
coupon_code |
code |
store |
store_name |
Date Formats Supported
- YYYYMMDD:
20251231 - DD/MM/YYYY:
31/12/2025 - YYYY-MM-DD:
2025-12-31(recommended)
Multiple Values
Use commas to separate multiple values:
- Stores:
"Nike,Adidas,Puma" - Categories:
"Clothing & Accessories,Women's Clothing,Sale"
Example CSV
id,title,description,store,categories,coupon_type,coupon_code,text_line_1,text_line_2,affiliate_link,terms,start_date,expiration_date,is_featured,status
,20% Off Nike Shoes,,Nike,"Clothing & Accessories,Shoes",Coupon,NIKE20,20%,Off,https://nike.com,Valid on all shoes,2025-01-01,2025-12-31,1,publish
,Free Shipping on Orders Over $50,,Adidas,"Clothing & Accessories,Sports Apparel",Deal,,Free,Shipping,https://adidas.com,Minimum $50 purchase,2025-01-01,2025-06-30,0,publish
Taxonomies
The plugin handles two taxonomies:
1. Store Categories (store-cat)
- Used for organizing coupons by store
- Imported/exported via the
storecolumn - Automatically creates new stores if they don't exist
2. General Categories (category)
- Used for general categorization (e.g., "Clothing", "Electronics")
- Imported/exported via the
categoriescolumn - Automatically creates new categories if they don't exist
ACF Custom Fields
The plugin integrates with Advanced Custom Fields (ACF) and handles these fields:
coupon_typecoupon_codecoupon_text_line_1coupon_text_line_2coupon_affiliate_linkterms_&_conditionsStart_Dateexpiration_dateis_featuredstore
Import Behavior
Creating New Coupons
- Leave the
idcolumn empty - The plugin will create a new coupon post
- Status defaults to
publishif not specified
Updating Existing Coupons
- Include the coupon's post
id - The plugin will update the existing coupon
- All fields will be overwritten with CSV data
Auto-Creation
- Stores: If a store name doesn't exist, it will be created automatically
- Categories: If a category doesn't exist, it will be created automatically
Troubleshooting
Categories Not Importing
Issue: Categories column is present but categories aren't being assigned.
Solution: The plugin uses the category taxonomy. Verify your WordPress setup uses this taxonomy for coupons.
Date Import Issues
Issue: Dates not importing correctly.
Solution: Use the YYYY-MM-DD format for best compatibility (e.g., 2025-12-31).
Special Characters in CSV
Issue: Commas or quotes in descriptions breaking the CSV.
Solution: Wrap fields containing commas or quotes in double quotes:
"Description with, comma","Category 1,Category 2"
Import Shows Errors
Issue: Import completes but shows error count.
Solution: Common causes:
- Missing
titlecolumn - Invalid post ID for updates
- Malformed CSV file
Technical Details
File Structure
coupon-import-export-plugin/
├── coupon-import-export.php # Main plugin file
├── includes/
│ ├── class-coupon-importer-exporter.php # Core functionality
│ └── admin-page.php # Admin UI template
└── README.md # This file
Hooks & Filters
admin_menu- Registers the admin menu pageadmin_init- Handles export actions
Requirements
- WordPress 5.0 or higher
- PHP 7.0 or higher
- Advanced Custom Fields (ACF) plugin (recommended)
Changelog
Version 1.0.0
- Initial release
- CSV import/export functionality
- Support for store and category taxonomies
- ACF integration
- Multiple date format support
- Column aliases
- Auto-creation of terms
Support
For issues or questions:
- Check the Troubleshooting section above
- Review your CSV file format
- Verify ACF field names match your setup
License
GPL v2 or later
Credits
Author: Furqan
Website: https://couponscodedeal.com/