可能是什么原因?尝试通过 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。
谢谢你的转发:)
我已经设定了这些条件:
$objConditionalRed->setConditionType(conditional::CONDITION_CELLIS);
$objConditionalRed->setOperatorType(conditional::OPERATOR_LESSTHAN);
$objConditionalRed->addCondition('50');
$objConditionalRed->getStyle()->getFill()->setFillType(fill::FILL_SOLID);
$objConditionalRed->getStyle()->getFill()->getStartColor()->setARGB('FFFF0000');
$objConditionalRed->getStyle()->getFont()->setBold(true);
Run Code Online (Sandbox Code Playgroud)
字体格式化效果很好(即使我将getFill更改为getFont和彩色字体也可以),但是,如果满足条件,单元将无法填充,这可能是什么问题?