Update Line Item Meta Data – WooCommerce API
For some reason, you have to double the arrays, maybe this doesn’t affect you as you are referencing the firt element. I use this in PHP: function saveMetaItem($id_order,$id_item,$id_product,$meta_key,$meta_value){ $woo = new wooclient(); $data = array( ‘line_items’ => array(array( ‘id’ => $id_item, ‘product_id’ => $id_product, ‘meta_data’ => array(array( ‘key’ => $meta_key, ‘value’ => $meta_value )) )) … Read more