title: Woocommerce API endpoint saying: Sorry, you are not allowed to edit this resource
body: <p>I am using the WooCommerce API endpoint for updating a order status to "completed" but I get this error:</p>
  
  <p>Error: Sorry, you are not allowed to edit this resource
  I am using the new WC API version 1 (and not the old legacy WordPress API versions 2 or 3).</p>
  
  <p>I use this:</p>
  
  <pre><code>$woocommerce = new Client(
      'https://www.xxxxxxxxxxxxxx.dk/', 
      'ck_xxxxxxxxxx', 
      'cs_xxxxxxxxxx',
      [
          'wp_api' =&gt; true,
          'version' =&gt; 'wc/v1',
      ]
  );
  
  $data = [
      'status' =&gt; 'completed'
  ];
  
  print_r($woocommerce-&gt;put('orders/5490', $data));
  </code></pre>
  
  <p>I have checked that the API key in WooCommerce has "read/write" permissions and that the user connected to the API key is an admin (if that has anything to say).</p>
  
  <p>I am using HTTPS / SSL.</p>
  
  <p>Can anyone tell me how to fix this error?</p>