wp wc-cli – adding product image
-
I’m trying to use wc-cli to add products. I cannot get
wp wc product create --images
to work. The command will create a product but will be there without the image.Using the GUI, I am able to create a product with an image and also to update/change the product image. I can also see that data in the database and view that data using wp listing commands.
I am able to use
wp media import
to upload an image and get the image id. I am also able to get the image url usingwp post get $imageId --field='guid'
The only way that I have succeeded in creating a product with an image so far is to write a CSV file and import the product however wc-cli does not support product import and does not have sufficient interest to add that capability.
I assume my problem is how to use the
--images
argument?It would be good to know how to use
--images
with a url, a file name and an existing (media) image id. Explanation of argument format, guidance and examples will be appreciated please! (Especially the examples…)
- The topic ‘wp wc-cli – adding product image’ is closed to new replies.