Skip to content

Instantly share code, notes, and snippets.

@strangerstudios
Created April 5, 2017 14:30
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save strangerstudios/ddc95dac10cff8fbfb50af25de170a77 to your computer and use it in GitHub Desktop.
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.
# 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