Skip to content

Instantly share code, notes, and snippets.

@ideadude
Created December 2, 2019 05:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ideadude/54f4a3653e55db8c03430f69b1c5b49b to your computer and use it in GitHub Desktop.
Save ideadude/54f4a3653e55db8c03430f69b1c5b49b to your computer and use it in GitHub Desktop.
Set an enddate for active subscriptions with PMPro
# 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