Skip Navigation

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

Problem:
Is there support for WooCommerce REST API with WPML?

Solution:
The support for WC REST API was implemented into WCML 4.6.5

Relevant Documentation:
https://wpml.org/download/woocommerce-multilingual-multicurrency/?section=changelog

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.

This topic contains 23 replies, has 3 voices.

Last updated by enricoG-14 4 years, 8 months ago.

Assisted by: Andreas W..

Author Posts
June 13, 2019 at 3:32 am #4009031

Andreas W.
Supporter

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

We have release the update for WooCommerce Multilingual. Please update to version 4.6.5 and verify the issue.

We have made tests on a new installation and the problems appears a solved.

Let us know if you need further assistance.

Kind regards
Andreas

June 13, 2019 at 10:17 am #4011693

tommiB

Hi,
yes, thanks, this seems to have fixed the problem with variation IDs changing!

Then there is still the original problem left I wrote about. I tested this with a clean install and it is occuring there also.

Steps to produce:
1. create a new variable product, set attributes and create variations
2. set regular price for variations
3. translate the product in WooCommerce -> Multilingual
4. check the price on the translated variation: it is ok
5. update one original language product variant using rest api interface
6. check the variants: regular price has changed with original language product.
7. in the translation variation the regular price has not changed

This can be fixed by updating the product data manually or from WPML troubleshooting page. However this is not very convinient as prices are changing daily and this creates extra manual work for the customer.

variant_price_step7.jpg
variant_price_step6.jpg
variant_price_step5.jpg
variant_price_step4.jpg
variant_price_step3.jpg
variant_price_step1-2.jpg
June 13, 2019 at 2:38 pm #4013981

Andreas W.
Supporter

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

WooCommerce Multilingual offers the possiblity to create, read, update, and delete translated WooCommerce content using the WooCommerce REST API.

The full documentation can be found here:
https://wpml.org/documentation/related-projects/woocommerce-multilingual/using-wordpress-rest-api-woocommerce-multilingual/

Indeed, the products will need to be synced in WCML after taking any changes.

I am consulting our 2nd Tier Suppport about the issue and I will get back to you as soon I received feedback.

Kind regards
Andreas

June 18, 2019 at 11:56 pm #4046793

Andreas W.
Supporter

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

Our second tier support is requesting more detailed information about how exactly the variants are updated one original language product using rest api interface.

Could you please provide the code?

Kind regards
Andreas

June 19, 2019 at 6:26 am #4048357

tommiB

Hi,

while testing myself, I just used Postman software (hidden link)

And then I just use HTTP PUT to update the price to the product variation. Like this:
hidden link

And we have the same result when we as a company use our own rest api client software (sorry I don't have code for that as I don't code it) but the idea is the same. Also this has been tried against different woocommerce instances on different servers. The one I used myself had only basic woocommerce+wpml plugins.

June 19, 2019 at 2:42 pm #4052231

Andreas W.
Supporter

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

Thank you for your message.

I have forwarded the provided information to our Secodn Tier Support and I will be in contact once I receive feedback.

Kind regards
Andreas

June 29, 2019 at 12:11 am #4110331

Andreas W.
Supporter

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

Thank you for your patience.

I have beem consulting our second tier support and our developers are actually working on a feature for supporting REST API with WooCommerce Multilingual, but this feature is still in development.

Until now I do not have any information about when the feature will be integrated into WCML.

We hope for your understanding.

Kind regards
Andreas

August 5, 2019 at 12:58 pm #4340679

tommiB

Hello, is there any update on schedule for REST API support improvements?

We have thousands of products so it is impossible to update then manually. Customer is not happy because translations are not up to date and variants are missing or have wrong price or stock balance.

May 11, 2021 at 4:01 pm #8741849

enricoG-14

The Variation IDs issue is still a problem! We have a lot of e-commerce that has the variation IDs bug!

When updating the product, the variations are deleted and recreated. We've tried to bypass this problem dozens of times but there a no chance to pair variation IDs to our software...

We've tried even to attach to the meta data our internal software ID, doing a lot of REST API calls to pair the variations through the meta data ID, but when the variation is deleted and recreated changes even the meta_data array not including previous keys and adding the "_wcml_duplicate_of_variation" key to the array.

https://wpml.org/it/forums/topic/id-variations-cambiati-allupdate-del-prodotto/

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.