title: Update Order custom Field value with WooCommerce REST API
body: <p>I am trying to update the Order custom field value <code>lworder</code>. I used the below code but I did not find any update. Can anyone please help me with this?</p>
  <pre><code>$api_response = wp_remote_post( 'https://your-website/wp-json/wc/v3/orders/{ORDER ID}', array(
      //'method'    =&gt; 'PUT',
      'headers' =&gt; array(
          'Authorization' =&gt; 'Basic ' . base64_encode( 'KEY:SECRET' )
      ),
      'meta_key' =&gt; array(
              'lworder' =&gt; 'ordered', 
      )
  ) );
  
  $body = json_decode( $api_response['body'] );
  //print_r( $body );
  
  if( wp_remote_retrieve_response_message( $api_response ) === 'OK' ) {
      echo 'The Order field  ' . $body-&gt;name . ' has been updated';
  }
  </code></pre>