REST API product image
-
Hi there,
I am using the REST API to WooCommerce to create simple and variable products.
Now I’m stuck at a problem with prouct images. The referenced images are already uploaded to WordPress.
Within the POST to create a product there is... "images": [ { "src": "https://www...jpg" } ], ...The product is created but the image is connected with the product as a product gallery image. I need the images a product image! Instead my shop isn’t working because the gallery images arn’t used.
When I change the image association to the product as I want it as the one product image all works in the shop and I mentioned a strange behaviour.
When I get this product via the REST API there is no difference in the JSON response for the image associated as product gallery image or as product image.
Is there a way to control the usage of the image or explicitliy add the image as product image?
Thanks for you help.Klaus
The topic ‘REST API product image’ is closed to new replies.