Skip to content

Instantly share code, notes, and snippets.

@gausam
Created October 22, 2020 10:57
Show Gist options
  • Save gausam/4be15e1858c54b4a95bce6c6dd01065b to your computer and use it in GitHub Desktop.
Save gausam/4be15e1858c54b4a95bce6c6dd01065b to your computer and use it in GitHub Desktop.
Set the end date for all active members on a membership level.
/*
SQL query to update the membership end date for all active members on the membership level with ID X.
This example sets it to midnight of August 31 2021.
Please replace X with the correct membership level ID.
As always, backup your database before running raq queries of this form.
*/
UPDATE wp_pmpro_memberships_users SET enddate = '2021-08-31 23:59:59' WHERE status = 'active' AND membership_id = X;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment