'How can I use the WooCommerce CLI to update a customer's metadata?
I feel like I should be able to do
sudo wp wc customer update 141 --meta_data="[{"key":"test_meta1","value":"test_meta_value"}]" --user=1
However, this does not work.
The result I get is
Success: Updated customer 141.
However,
sudo wp wc customer get 141 --fields=meta_data --user=1 | grep test_meta
returns blank.
Almost certainly, I'm not providing the data in the right format, but I'm not sure what it is, or where its documented.
Possibly helpful links: How to add meta_data to the a WooCommerce customer
https://github.com/woocommerce/woocommerce/issues/18810
https://github.com/woocommerce/woocommerce/wiki/WC-CLI-Overview
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
