Last active
June 15, 2022 22:23
-
-
Save fernandovbs/b059b7a6861bc33df71a64403147f0de to your computer and use it in GitHub Desktop.
Bulk update wc membership user plans for all customers
This file contains 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
wp wc user_membership list --field=id --user=id5 --allow-root | xargs -n1 wp wc user_membership update --plan_id="274" --user=USER_NAME | |
#wp wc user_membership list can limit the results. An alternative is to use wp post list to get all membership posts: | |
wp post list --post_type=wc_user_membership --field=ID | xargs -n1 wp wc user_membership update --plan_id="274" --user=USER_NAME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment