Arū*_*šis 3 woocommerce woocommerce-rest-api
可能是什么原因?尝试通过 REST API 在 WooCommerce 中批量更新产品图像(和价格)。图片已存在于 wordpress 媒体库中,链接已正确复制。但是,它不是使用图像而是创建新图像。
请求:POST。网址:https://SiteURL/wp-json/wc/v2/products/xxxx?consumer_key=c______&consumer_secret=_____
身体:
{"update":[
{"regular_price":"448",
"images":[
{"src":"https://urlToImage.jpg",
"position":0, "name": "test"}
],"id":"xxxx"}]}
Run Code Online (Sandbox Code Playgroud)
作为回应,我可以看到它创建了具有相同 url 的图像,但由于库中已经有一个图像,它将 -1 添加到 url。
谢谢你的转发:)
| 归档时间: |
|
| 查看次数: |
1076 次 |
| 最近记录: |