Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Woocommerce products can not be queried in another language #47

Open
cankahya opened this issue May 2, 2024 · 1 comment
Open

Woocommerce products can not be queried in another language #47

cankahya opened this issue May 2, 2024 · 1 comment

Comments

@cankahya
Copy link

cankahya commented May 2, 2024

The following query should return the english versions of the products. Instead it returns the main locale (german in this case):
Query
{ products(where: {wpmlLanguage: "en"}) { nodes { id slug name ... on SimpleProduct { id name buecherFields { buchKategorien { nodes { name slug } } } buchInfos { buchInfos } locale { locale id } } } } }

Response

{
  "data": {
    "products": {
      "nodes": [
        {
          "id": "cHJvZHVjdDoxMDE4Mg==",
          "slug": "sollberger-boegli",
          "name": "Sollberger Bögli",
          "buecherFields": {
            "buchKategorien": {
              "nodes": [
                {
                  "name": "De aedibus",
                  "slug": "de-aedibus"
                }
              ]
            }
          },
          "buchInfos": {
            "buchInfos": "<p>Herausgegeben von: Heinz Wirz<br />\nTextbeitrag: Katharina Marchal</p>\n"
          },
          "locale": {
            "locale": "de_DE",
            "id": "de_DE"
          }
        },
....
@cankahya
Copy link
Author

cankahya commented May 2, 2024

Not sure if this is a bug with wp-graphql-wpml or with the woocommerce plugin. Clarifcation would be great!

This is a very crucial feature, which makes the use of graphql for multilangual woocommerce sites impossible.
Please priotize.

Also happy Thanks for any tip!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant