In this tutorial, we will show you how to massively edit the expiration dates of hundreds of Easy Digital Downloads (EDD) Discount Codes.
Sometimes it’s good to extend the expiration dates of hundreds of discount codes when coupon campaigns are helping to increase sales, and we want to give our customers a few more days to use the discounts.
For this, we will use WP Sheet Editor – Custom Tables plugin.
With this plugin, you can massively manage EDD discount codes using an intuitive spreadsheet within WordPress.
In this case, it will help us to massively edit the expiration dates of hundreds of discount codes at once.
You can download the plugin here:
Download Custom Database Tables Spreadsheet Plugin - or - Check the features
Once you install and activate the plugin, follow these steps to massively change the expiration dates of hundreds of EDD discount codes.
1. Open the discount codes spreadsheet
For this, you’ll have to go to WP Sheet Editor > Edit custom database tables, where you can open the Edit WP Edd Adjustments spreadsheet.
After setting up the spreadsheet, you’ll see all the discount codes displayed on it.
2. Search for the EDD discount codes to be edited
You can filter all the discount types by any search parameter like:
But in this case, we want to filter our EDD coupon codes by expiration date.
For this, you’ll need to use the Search tool, located in the plugin’s toolbar.
Once you’re on the Search tool, you need to select the following values to search for discount codes by expiration date:
- Field: End Date
- Operator:
- If you’ll use a full date and hour, use the equal (=) operator.
- But if you want to search for dates only, use the CONTAINS operator.
- Value: Here you must enter the date or date + time using this format YYYY/MM/DD HH:MM:SS. For example, we are looking for all discount codes that expire on December 31, 2022, at 23:59.
- Hit Run search to filter your discount codes by expiration date.
3. Bulk edit expiration dates for EDD discount codes
Now that you have filtered your discount codes by expiration date, you will see the search results and the applied search filters.
Now you need to open the Bulk Edit tool, which will allow you to bulk update the expiration dates for all the filtered EDD discount codes.
a) Bulk set the same expiration date for all EDD discount codes
Once you open the Bulk Edit tool, select the following values:
- Select the rows that you want to update: Edit all the rows from my current search (including non-visible rows)
- What field do you want to edit: End Date
- Select type of edit: Set value
- Replace existing value with this value: Add the date and time using this format: YYYY/MM/DD HH:MM:SS
- Click on Execute Now.
As you see, the expiration dates have been updated for all the selected EDD discount coupons.
b) Set a random expiration date for all EDD discount codes
Now you will see how you can enter different dates randomly to your EDD discount codes in a very easy way.
After opening the Bulk Edit tool, enter the following values:
- Select the rows that you want to update: Edit all the rows from my current search (including non-visible rows)
- What field do you want to edit: End Date
- Select type of edit: Set random value
- Replace the existing value with a random value from a list: Enter the values separated with | if you want to select from a predefined list, or enter 2 dates separated with > if you want to select any date from that range. Remember to add the dates and times using this format: YYYY/MM/DD HH:MM:SS
- Click on Execute Now.
And just like that, we have updated the expiration dates of selected EDD discount coupons with random dates.
c) Replace a specific expiration date on the EDD discount codes
If you just want to replace a specific expiration date or time, and you don’t need to see which codes will be modified, you can do so without filtering the EDD discount codes.
To do so, follow the steps below:
First, open the Bulk Edit tool, and select the following values:
- Select the rows that you want to update: Edit all the rows from my current search (including non-visible rows)
- What field do you want to edit: End Date
- Select type of edit: Replace
- Replace this: Enter the date and time to be replaced (here you can also enter just a specific date OR time)
- With this: Enter the new date and time (If in the previous field you entered only a time, here you must enter the new time, and the same if you replace only dates)
- Click on Execute Now.
Now we can see that the only expiration date that was replaced by the new one was the old one we entered.
Managing your EDD discount codes by expiration date is really easy with WP Sheet Editor. As you can see, with this plugin you can perform advanced searches, bulk edit different fields of hundreds of Easy Digital Downloads discount codes, and more.
You can download the plugin here:
Download Custom Database Tables Spreadsheet Plugin - or - Check the features