Created
April 5, 2017 14:30
-
-
Save strangerstudios/ddc95dac10cff8fbfb50af25de170a77 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.
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