API Endpoint saying: “Error: Sorry, you are not allowed to edit this resource”
-
I am using the WooCommerce API endpoint for updating a order status to “completed” but I get this error:
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).
I use this:
$woocommerce = new Client( 'https://www.xxxxxxxxxxxxxx.dk/', 'ck_xxxxxxxxxx', 'cs_xxxxxxxxxx', [ 'wp_api' => true, 'version' => 'wc/v1', ] ); $data = [ 'status' => 'completed' ]; print_r($woocommerce->put('orders/5490', $data));
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).
I am using HTTPS / SSL.
Can anyone tell me how to fix this error?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘API Endpoint saying: “Error: Sorry, you are not allowed to edit this resource”’ is closed to new replies.