Created
December 2, 2019 05:38
-
-
Save ideadude/54f4a3653e55db8c03430f69b1c5b49b to your computer and use it in GitHub Desktop.
Set an enddate for active subscriptions with PMPro
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
# BACKUP FIRST | |
# This SQL query will set the expiration date | |
# to 2020-01-01 for any active membership with | |
# a different current enddate. | |
# BACKUP FIRST | |
UPDATE wp_pmpro_memberships_users | |
SET enddate = '2020-01-01 00:00:00' | |
WHERE status = 'active' | |
AND enddate IS NOT NULL | |
AND enddate <> '0000-00-00 00:00:00' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment