Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
WooCommerce REST API is not pulling all orders for users from all languages.

Solution:
Make sure "Orders (shop_order)" is set to "Not Translatable" at WPML -> Settings -> Post Type Translation

Relevant Documentation:
N/A

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 9 replies, has 2 voices.

Last updated by Subash Chandra Poudel 1 year, 9 months ago.

Assisted by: Subash Chandra Poudel.

Author Posts
August 21, 2023 at 10:29 am #14262471

antonD-16

Good morning.
We have an integration problem between a site on WordPress using WPML and Baselinker.
The site uses WPML's multicurrency feature depending on the language version - PLN for the Polish language version and EUR for the others.
However, orders placed in EUR do not go to Baselinker. Baselinker support says that the order information does not appear in the API. Could I ask for help on this issue?

August 23, 2023 at 12:07 am #14274025

Subash Chandra Poudel

Hi there,

Firstly, to ensure the quickest and most accurate support, please provide your debug information so that I can get a look at some of your configurations. You can find it in WPML > Support > click on “Debug information” link. Please check this link for more info: http://wpml.org/faq/provide-debug-information-faster-support/

Now regarding the issue, can you please let me know more details on Baselinker? How is the site integrated with Baselinker? Is it using some API/Code or using Plugin?

Please note if this is using some custom solution or coding then you might need a custom code solution using our Coding API which could fall out of our support scope. More details on our Coding API are at: https://wpml.org/documentation/support/wpml-coding-api/

Regards,
Subash

August 23, 2023 at 9:09 am #14276327

antonD-16

Hi.
Baselinker integrates with Woocommerce through an API - here is the Baselinker's manual: hidden link
We did everything step by step like in this video.
We also tried to disable multicurrency on our copy of the site, but only orders made from the Polish language version still go through. So most likely the problem is not with the currency, but with the language of the order.

August 24, 2023 at 2:15 am #14281073

Subash Chandra Poudel

Thank you for the details.

It seems like the Baselinker uses WordPress Rest API to pull the orders.

We have documentation on how to properly use REST API with WCML linked next:

https://wpml.org/documentation/related-projects/woocommerce-multilingual/using-wordpress-rest-api-woocommerce-multilingual/

However, this might need to be looked upon and addressed by the Baselinker provider. So I recommend you contact the Baselinker provider and also ask them to join our Go Global Program linked next so that we can collaborate with them to make them compatible with WPML.

https://wpml.org/documentation/support/go-global-program/

August 28, 2023 at 7:54 am #14297923

antonD-16

Hi.
I don't think persuading a third party company to work with you will solve my problem.
For my part, I have made 5 different test orders:
- in Polish, country of delivery Poland
- in Polish, country of delivery Germany
- in English, country of delivery Poland
- in English, country of delivery Germany
- in German, country of delivery Germany

With WPML enabled, I imported the orders in Baselinker and it only imported the orders in Polish (i.e. the first two). On the other hand, when I disabled the WPML plugin and did the import in Baselinker, it imported all the orders. So the problem lies somewhere in the language itself. Please let me know how to solve this.

August 30, 2023 at 8:33 am #14311501

Subash Chandra Poudel

Hi there,

I understand your concerns. However, when WPML is activated the REST API to pull/view orders from WooCommerce should be formatted accordingly to support WPML as explained in the next link:

https://wpml.org/documentation/related-projects/woocommerce-multilingual/using-wordpress-rest-api-woocommerce-multilingual/

If you need to pull/view all orders when WPML is activated you need to pass the value "all" to "lang" parameter otherwise orders from only the default language or whatever language you pass to "lang" parameter will be returned.

This is not an issue but expected and is a feature.

I would appreciate it if you contact Baselinker and let them know about this parameter to pull Multilingual orders with WPML and let us know what they say. Also, if they could join our Go Global Program as I explained in my previous reply linked next, we can collaborate with them to make them compatible with WPML.

https://wpml.org/forums/topic/multicurrency-baselinker/#post-14281073

Regards,
Subash

September 4, 2023 at 12:51 pm #14336971

antonD-16

I have forwarded all information to Baselinker. We are waiting for their response.
On the other hand, a friend of ours also has a shop and uses WPML and has an integration with Baselinker. I asked him to verify if Baselinker catches their orders in another language. After testing, it turned out that there is no problem - the orders go through to Baselinker.
Is it possible to verify our WPML settings?

September 5, 2023 at 6:55 pm #14346969

Subash Chandra Poudel

Thank you for forwarding the details to the setup provider.

Sure, I can log in to your site and verify if WPML and WCML are set up properly or not. For that, would you please mind sharing temporary access (WP-Admin and FTP) to your site? Preferably to a test site where the problem has been replicated.

I have enabled a private reply for you to share the credentials securely, which means only you and I have access to it.

IMPORTANT: Please take a complete backup of the site first to avoid data loss.

Regards,
Subash

September 6, 2023 at 11:26 am #14351651

antonD-16

Hi.
I've got mail that there is new version, so I've downloaded WPML Multilingual CMS - ver. 4.6.6
and WPML String Translation - ver. 3.2.8 but still the same problem

September 7, 2023 at 11:31 am #14358881

Subash Chandra Poudel

Thank you for the details.

Settings wise the test site you sent the details for looks all good. Except I see that at WPML -> Settings -> Post Type Translation the post type "Orders (shop_order)" is set to be "Translatable". When you set up WooCommerce multilingual the orders are by default set to "Not translatable" and locked.

So this means, at some point, you manually changed the translation preference for "Orders (shop_order)" from WPML -> Settings -> Post Type Translation. Is there some reason for this? If not, then this is the issue and this might cause other issues on the site as well.

If there is no reason to set the Orders (shop_order) to be translateable please backup the site to prevent any issues then go to WPML -> Settings -> Post Type Translation and set Orders (shop_order) to not translatable.

Regards,
Subash

September 8, 2023 at 10:07 am #14365679

antonD-16

That was it, thank you very much 😉