entity-command
entity-command copied to clipboard
Accept multiple key/value pairs in post meta add/update.
Originally from @killown https://github.com/wp-cli/wp-cli/issues/4621
It would be useful for performance reasons to be able to add/update multiple key/value pairs in post meta add and post meta update.
See also https://github.com/wp-cli/wp-cli/issues/4616, which would give an alternative method via --meta_input.
This would now work with the latest master through the use of JSON notation added to --meta_input:
wp post update <id> --meta_input='{"key1":"value1","key2":"value2",...}'
Thanks a lot for implement this feature, now wp cli is 10 faster depending on how many meta updates we are dealing with