Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter pioneerweb

    (@pioneerweb)

    I’ve found a temporary solution:

    • 1. Download images with a different httpclient like guzzle to local cache
    • 2. Upload images one at a time with curl straight to wordpress library, getting the IDs as you go
    • 3. Include only the image IDs in the POST() with the API
    • This is a great example of how to do the above.

      This also proves that curl is up to the task just fine while the POST command just complains about lots of images even though it’s using curl. Still takes about 3 minutes to create one product though…

    Thread Starter pioneerweb

    (@pioneerweb)

    Well it’s more about the functionality of the woocommerce PUT function, since it seems to always overwrite images rather than add to the existing gallery. The “custom code” was just for context.

    The problem is I don’t have the option of uploading all the images at once with POST, so how can I do it one at a time with PUT?

Viewing 2 replies - 1 through 2 (of 2 total)