Creating orders with wp-cli. Need syntax for order_meta.
-
I’m using wp-cli to create orders from a script. It’s working great at this point, but now I need to add a custom field to my orders. My understanding is that I should be able to pass that along using order_meta, but I’m unsure of the syntax I should use to specify a name and a value. I can’t find it documented anywhere.
My order creation command looks like this:
wp wc order create --path=/home/mqwr/public_html/wordpress --status='processing' --customer_id=324 --billing_address.first_name='Chester' --billing_address.last_name='Tester' --billing_address.address_1='123 Testing Lane' ... blah blah blah more fields and values and then ... shipping_address.country='US' --note='Ship Via: FedEx Ground' --line_items.0.product_id=119 --line_items.0.quantity=1 --line_items.1.product_id=130 --line_items.1.quantity=2
So I need to add “–order_meta=[insert solution here]”.
The name will be “hubpoid” and the value will be a 16 digit number.
Any ideas?
Thanks,
Marshall
- The topic ‘Creating orders with wp-cli. Need syntax for order_meta.’ is closed to new replies.