|
|
Hi, I'm having trouble retrieving prices in different languages via GraphQL.
I've set up multilingual support using WPML Multilingual & Multicurrency for WooCommerce. But I can't retrieve the price for Ukrainian, for example.
How can I do this?
{
product(id: "pidvikonnya-pd-101", idType: SLUG) {
... on SimpleProduct {
id
name
regularPrice(format: RAW)
translations {
translations {
... on SimpleProduct {
id
name
regularPrice(format: RAW)
}
}
}
}
}
}
{
"data": {
"product": {
"id": "cG9zdDoxMDY3",
"name": "Підвіконня PD 101",
"regularPrice": "206",
"translations": [
{
"translations": [
{
"id": "cG9zdDoyNzM5",
"name": "Parapet PD 101",
"regularPrice": "206"
},
{
"id": "cG9zdDoxNzMz",
"name": "Solbanc PD 101",
"regularPrice": "206"
},
{
"id": "cG9zdDoyNTkx",
"name": "Подоконник PD 101",
"regularPrice": "206"
},
{
"id": "cG9zdDoxMDY3",
"name": "Підвіконня PD 101",
"regularPrice": "206"
}
]
},
{
"translations": [
{
"id": "cG9zdDoyNjgy",
"name": "Window sill PD 101",
"regularPrice": "206"
},
{
"id": "cG9zdDoxNzMz",
"name": "Solbanc PD 101",
"regularPrice": "206"
},
{
"id": "cG9zdDoyNTkx",
"name": "Подоконник PD 101",
"regularPrice": "206"
},
{
"id": "cG9zdDoxMDY3",
"name": "Підвіконня PD 101",
"regularPrice": "206"
}
]
},
{
"translations": [
{
"id": "cG9zdDoyNjgy",
"name": "Window sill PD 101",
"regularPrice": "206"
},
{
"id": "cG9zdDoyNzM5",
"name": "Parapet PD 101",
"regularPrice": "206"
},
{
"id": "cG9zdDoyNTkx",
"name": "Подоконник PD 101",
"regularPrice": "206"
},
{
"id": "cG9zdDoxMDY3",
"name": "Підвіконня PD 101",
"regularPrice": "206"
}
]
},
{
"translations": [
{
"id": "cG9zdDoyNjgy",
"name": "Window sill PD 101",
"regularPrice": "206"
},
{
"id": "cG9zdDoyNzM5",
"name": "Parapet PD 101",
"regularPrice": "206"
},
{
"id": "cG9zdDoxNzMz",
"name": "Solbanc PD 101",
"regularPrice": "206"
},
{
"id": "cG9zdDoxMDY3",
"name": "Підвіконня PD 101",
"regularPrice": "206"
}
]
}
]
}
},
|