A WordPress plugin that adds the ability to clone discount codes in Easy Digital Downloads, including all settings and metadata.
This plugin adds a "Clone" action to the Easy Digital Downloads discount codes table. When cloning a discount code, it creates an exact copy of the original discount with:
- A new name (original name with "(Copy)" appended)
- A unique code (original code with "-1", "-2", etc. appended)
- Inactive status (to prevent accidental use)
- Reset usage count
- All other settings preserved, including:
- Amount and type (percentage or flat)
- Start and end dates
- Minimum purchase requirements
- Maximum uses
- Product requirements and exclusions
- Category requirements and exclusions
- Usage restrictions
- Notes and internal comments
- Any additional settings from extensions that modify the discount object, like AffiliateWP and WP Fusion
After cloning, you'll be shown a success message with a direct link to edit the newly created discount code.
- Download the plugin zip file
- Go to WordPress admin > Plugins > Add New
- Click "Upload Plugin"
- Upload the zip file
- Activate the plugin
Or manually:
- Download and unzip the plugin
- Upload the
edd-discount-cloner
folder to/wp-content/plugins/
- Activate the plugin through the WordPress admin
- Go to Downloads > Discount Codes
- Hover over any discount code
- Click the "Clone" link that appears
- A new inactive copy of the discount will be created
- Click the "Edit the cloned discount" link in the success message to review and modify the new discount
The plugin includes several security measures:
- Nonce verification for clone actions
- Capability checks (
manage_shop_discounts
required) - Data sanitization and validation
- Safe redirects and escaped output
For bug reports or feature requests, please open an issue on GitHub.
Contributions are welcome! Please feel free to submit a Pull Request.
This plugin is licensed under the GPL v2 or later.
- Initial release
- Added ability to clone discount codes
- Added direct link to edit newly created discounts