Forked from strangerstudios/set_enddate_null.sql
Last active
September 19, 2018 18:05
-
-
Save pbrocks/0cefcd7e122ce375e75bd5c1f095dd4d to your computer and use it in GitHub Desktop.
This SQL query will clear the expiration date for active recurring memberships in Paid Memberships Pro (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 | |
# You generally do not want to setup PMPro levels | |
# with both a recurring billing amount AND | |
# an expiration date. | |
# This SQL query will clear the expiration date | |
# for active recurring memberships. | |
# BACKUP FIRST | |
UPDATE wp_pmpro_memberships_users | |
SET enddate = '0000-00-00 00:00:00' | |
WHERE status = 'active' | |
AND cycle_number > 0 | |
AND (enddate IS NULL OR 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