不幸的是,我正在使用wordpress和woocommerce,我要完成的工作是使用woocommerce REST API插入产品和相对翻译,这里是这种情况:
{
"name": "Dummy",
"type": "variable",
"attributes": [
{
"id": 2,
"name": "Color",
"position": 1,
"variation": "true",
"options": [
"Bianco",
"Nero"
]
},
{
"id": 3,
"name": "Size",
"position": 2,
"variation": "true",
"options": [
"A",
"B",
"C"
]
}
]
}
这是一个可变产品,因此我也需要创建其变体 创建的产品返回其ID,例如10
{
"regular_price": "10.10",
"stock_quantity": 10,
"attributes": [
{
"id": 2,
"name": "Color",
"option": "Bianco"
},
{
"id": 3,
"name": "Size",
"option": "A"
}
]
}
{
"name": "Dummy en",
"type": "variable",
"lang": "en",
"translation_of": 10
}
en
,主要语言是it
translation_of
发生的事情是英语产品被创建,但是没有变化
我尝试过的事情:
有任何提示吗?谢谢