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 |
---|---|
May 27, 2019 at 2:51 pm | |
tommiB |
I am trying to: update prices for variable product variations using Woocommerce rest api interface. Price is updated to the main language products, but not to translated products Link to a page where the issue can be seen: hidden link This is the main language product I expected to see: Instead, I got: Translation has different price |
May 27, 2019 at 8:54 pm #3900871 | |
Andreas W. Supporter Languages: English (English ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, Thank you for contacting the WPML Support Forum. Please make a backup of your site and database. Go to WooCommerce -> WooCommerce Multilingual -> Status and select the option Troubleshooting at the right bottom corner. Complete the available tasks for syncronizing product stock and variables. Let me know if this solved the issue. Kind regards |
May 28, 2019 at 4:55 am #3902707 | |
tommiB |
Hi, yes, this will resolve it temporarily. But products are updated real-time many times a day, so it is not very efficient if it has to be done this way manually. This should work automatically. Is there a fix coming to this issue that the products would sync automatically? |
May 28, 2019 at 6:32 pm #3909383 | |
Andreas W. Supporter Languages: English (English ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, Could you please verify if you followed the steps inside of this guide: Let me know if there are further isssues with the content. Kind regards |
May 29, 2019 at 6:17 am #3912069 | |
tommiB |
Hello! Yes this is how we basically do it. We have our own software that is the client. The problem is not when creating a new variable product and variations and their translations. Creating a new variable product with variants and the translations works ok. The problem is when price is updated to a variable product's variants that were previously created. Price is saved to main language product variations but not to the translated. So there is some kind of sync problem probably when updating product data for variants. |
May 30, 2019 at 2:05 am #3919387 | |
Andreas W. Supporter Languages: English (English ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, Thank you very much for clarifying the issue. Could you please try to run the site in minimal setup to see if the issue persists? Please disable any additional plugin and try to run the site with WooCommerce and WPML and its add-ons. If the issue disappears please start reactivating any plugins, or activate them in small groups. This way please verify at which points the issue appears again to indicate the plugin that is causing the issue. Also please change to a default theme like TwentySeventeen if possible to see if the issue might be theme related. Further, you could enable the wp-debug feature to see if there are any current PHP errors given. Add the following to your wp-config.php file: define('WP_DEBUG', true); The wp-config.php is located in your WordPress root directory. It’s the same file where the database configuration settings are. You will have to access it by FTP or SFTP in order to edit it. If you open wp-config.php and that define statement is not there, you can add it right before this line: /* That's all, stop editing! Happy blogging. */ Now please visit the sections of your site in regards to the issue on front end and backend. You will be able to see possible errors on inside of your wp-content folder. Look for a debug.log file and provide me the results. More information about how to activate this feature you can find here: In case you will not find the time to investigate the issue please leave me anotification and I might try to create a Duplicator package for testing locally or we cvould offer to migrate the site to our test server. Kind regards |
June 3, 2019 at 5:40 am #3939415 | |
tommiB |
Hi, thank you. Meanwhile, if you can make duplicator package and test if you can replicate that price not changing problem, it would be very helpful. |
June 3, 2019 at 10:04 am #3941171 | |
tommiB |
Yes, I was also to replicate this second problem in the test environment and it seems is also connected to WPML. This happens also without updates from REST API. When I deactivated WPML plugins, this does not happen any more. The problem is this 1. create a new variable product and variants from attrbiutes. Save as a draft We have a external table for product and their variant id's used for product updating via REST API. This is why we can't have the id's changing |
June 3, 2019 at 5:49 pm #3945081 | |
Andreas W. Supporter Languages: English (English ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, Do I understand right, that those ID's are changing even if the site runs only WooCommerce and WPML plus add-ons and a default theme? I would kindly like to ask you to recreate the issue on the following sandbox test site in order to escalate the issue to our compatibility team. One Click Login: hidden link In case you will not find the time to recreate the issue please install the necessary plugins and send me short notification. Kind regards |
June 4, 2019 at 4:59 am #3947977 | |
tommiB |
Hi! Yes, I was able to reproduce it there! I created a test product with variants and translations in Finnish. Then, after making a bulk edit to the English product on the All Products site, the IDs for the English product's variants have been changed to: 28,29,30,31. In the edit I only changed product status to "Published" Bulk editing the Finnish language product didn't cause IDs to change. |
June 4, 2019 at 3:57 pm #3953507 | |
Andreas W. Supporter Languages: English (English ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, I have tried to recreate the issue but I can not find any issues. I can see that when I connected to the site that you did not finish the WooCommerce and WooCommerce MUltilingual Setup Wizard. Could you please test now again? I have created various variable products on draft, assigned attributes and variables, edited prices, translated, and published. Could you please once more provide detailed steps to recreate the issue? Kind regards |
June 5, 2019 at 6:42 am #3957421 | |
tommiB |
Hi, here are the steps in detail with images: It seems this happens only when doing publish from the All Produts page. If done from the product edit page, this does not happen. Problem is that customer has a lot of produts and it was easier to publish a lot of products at a time instead of one product at a time. |
June 5, 2019 at 3:04 pm #3962193 | |
Andreas W. Supporter Languages: English (English ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, Thank you very much for your message. I was able to recreate the issue. The attribute IDs indeed change when publishing the product with the bulk edit or quick edit option. As workaround I would advise you to use the publish option on the product editor instead, for the meantime. I also can confirm that the issue only appears if WPML is active. The issue has been escalated to ur compatibility team and I will be on contact with you as soon we can provide a workaround. The issue should be solved with the next update for WooCommerce Multilingual. Kind regards |
June 6, 2019 at 10:07 am #3968011 | |
tommiB |
All right, thank you. Hope to see this resolved soon. |
June 6, 2019 at 3:13 pm #3970169 | |
Andreas W. Supporter Languages: English (English ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, I will get back to you as soon I am able to provide a workaround or receive news update a fix with the upcoming update. Kind regards |