Created
October 29, 2020 15:16
-
-
Save andrewlimaza/bb640f91416bd7fd2979850973ff6200 to your computer and use it in GitHub Desktop.
Bulk update expiration date for existing Sponsored Members Discount Code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Please have a backup of your database before running this code. | |
* Adjust your 'wp_' prefix to match that of your WordPress database. | |
* This works only with mySQL databases. | |
* | |
* Adjust the expiration date by 10 years for all discount codes starting with "S". | |
*/ | |
UPDATE wp_pmpro_discount_codes SET `expires` = DATE_ADD(expires, INTERVAL 10 YEAR) WHERE `code` LIKE 'S%' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment