Last active
November 21, 2024 14:16
-
-
Save dparker1005/293dc4e2acde9dbf5b7fd3ec7abdd487 to your computer and use it in GitHub Desktop.
SQL query to help fix sites affected by this Pay By Check bug: https://github.com/strangerstudios/pmpro-pay-by-check/pull/131. Update total, subtotal, and membership_id accordingly.
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
/* | |
Query to help sites affected by this PMPro Pay By Check bug: | |
https://github.com/strangerstudios/pmpro-pay-by-check/pull/131 | |
This will set all $0 check orders for a specific level to have a specific total. | |
This will not account for variable pricing such as donations or discount code uses. | |
Before executing this query, set membership_id to the level that you would like to fix | |
and total and subtotal to the recurring price for that level. | |
Before running this query, make sure to back up your database in case anything goes wrong. | |
*/ | |
UPDATE wp_pmpro_membership_orders | |
SET total = 100, subtotal = 100 | |
WHERE total = 0 AND membership_id = 2 AND gateway = 'check'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment