I am currently trying to update the product image of a product in our WooCommerce catalog using the REST API.
I'm making the following request:
{
"product":{
"title":"My Product.",
"regular_price":"112.00",
"description":"",
"short_description":"",
"images":[
{
"src":"https://www.example.com/image.jpg",
"position":0
}
],
"sku":"myprod",
"categories":[
722
],
"sold_individually":true,
"reviews_allowed":false,
"enable_html_description":true,
"enable_html_short_description":true
}
}
Which is being made to the following URL via a PUT request: https://www.example.com/wc-api/v3/products/24001?consumer_key=[key]&consumer_secret=[secret]
However the response I get and the details of the product when I look in Wordpress still shows the placeholder image as the product image.
The image itself (which is hosted in an S3 bucket which is accessible), is getting added to my Wordpress install and is viewable within the media library on Wordpress.
Modifying the URL and details so I am creating a new product, not updating an existing one, exhibits the same issue.
Any idea why the image is not getting set as the product image? I am using WooCommerce 2.4, REST API V3 on Wordpress 4.4.1