This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Tagged: 

This topic contains 4 replies, has 2 voices.

Last updated by Shekhar Bhandari 9 months, 1 week ago.

Assigned support staff: Shekhar Bhandari.

Author Posts
January 7, 2019 at 9:53 pm #3064470

anthonyE-4

I am trying to:
I'm trying to get posts under specific language by REST API.

Link to a page where the issue can be seen:
hidden link
hidden link

I expected to see:
I have one English product, and none Franch product yet. So the first api should return one item, and the second api should return zero.

Instead, I got:
I got the same data; one product on both Api.

Before I updated WPML plugin, it worked.

January 8, 2019 at 5:32 am #3065474

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Thank you for contacting WPML support. I'd be happy to assist you further on this issue.

Could you please follow the steps as mentioned here and let me know if this helps?
https://wpml.org/documentation/related-projects/woocommerce-multilingual/using-wordpress-rest-api-woocommerce-multilingual/

You mentioned that it was working before the update of WPML, right? are you referring to WPML 4.1.2 as the previous version?

Look forward to your reply.

Thanks

January 8, 2019 at 2:23 pm #3067407

anthonyE-4

Hi Shekhar,
I don't use Woocommerce. Product is the one of custom post type.
The version that I used was v4.1.1

January 8, 2019 at 3:33 pm #3067724

anthonyE-4

FYI.
I just downgrade the plugin to 4.1.1, and it's working.
I hope this would help you to find the clue.

January 9, 2019 at 4:59 am #3069805

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

We checked this further and we are trying to find the solution for this, in the meantime, our 2nd tier suggested that you can add a ?lang=fr at the end of the URL to receive the correct items.

More info here: https://wpml.org/forums/topic/wp-rest-api-wpml/#post-3064365

I will update you as soon as I will have more info regarding this issue or the fix.

Thanks

The topic ‘[Closed] WPML REST API doesn't return proper items’ is closed to new replies.