title: WooCommerce API: Create order with meta data on line item
body: <p>I'm using this API to create orders in WooCommerce: <a href="https://github.com/kloon/WooCommerce-REST-API-Client-Library" rel="nofollow">https://github.com/kloon/WooCommerce-REST-API-Client-Library</a></p>
  
  <p>When I'm adding an order:</p>
  
  <pre><code>$orderData = array(
      "order" =&gt; array(
          "line_items" =&gt; array( 
              array(
                  "product_id" =&gt; 1, 
                  "quantity" =&gt; 1
              ) 
          )
      )
  );
  
  $client-&gt;orders-&gt;create($orderData);
  </code></pre>
  
  <p>everything works fine, the order is created in WooCommerce.</p>
  
  <p>But When I want to add a product variation with meta data about the variation, how should I do that?</p>
  
  <p>I tried several things, including:</p>
  
  <pre><code>$orderData = array(
      "order" =&gt; array(
          "line_items" =&gt; array( 
              array(
                  "product_id" =&gt; 1, 
                  "quantity" =&gt; 1,
                  "variation_id" =&gt; 2,
                  "variations" =&gt; array(
                      "color" =&gt; "black"
                  )
              ) 
          )
      )
  );
  
  $client-&gt;orders-&gt;create($orderData);
  </code></pre>
  
  <p>What I want to achieve is, when getting the order with:</p>
  
  <pre><code>$client-&gt;orders-&gt;get( $order_id );
  </code></pre>
  
  <p>The color info is already added to the meta data of the line item (so the color description is visible in the order details when sending an email):</p>
  
  <pre><code>line_items: [
      {
          id: ...,
          subtotal: "...",
          subtotal_tax: "...",
          total: "...",
          total_tax: "...",
          price: "...",
          quantity: 1,
          tax_class: null,
          name: "Product name",
          product_id: 1,
          sku: "",
          meta: [
              {
                  key: "color",
                  label: "Color",
                  value: "black"
              }
          ]
      }
  ]
  </code></pre>
  
  <p>Hope the question is clear enough and someone can point me to the right solution :)</p>
  
  <p>Thanks for your patience to read this.</p>