Skip to content Skip to sidebar

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.

Sun Mon Tue Wed Thu Fri Sat
10:00 – 14:00 10:00 – 14:00 10:00 – 14:00 10:00 – 14:00 10:00 – 14:00 - -
16:00 – 20:00 16:00 – 20:00 16:00 – 20:00 16:00 – 20:00 16:00 – 20:00 - -

Supporter timezone: Asia/Jerusalem (GMT+02:00)

This topic contains 1 reply, has 0 voices.

Last updated by Itamar 1 year, 2 months ago.

Assisted by: Itamar.

Author Posts
December 24, 2024 at 1:02 pm #16543789

Михаил Филипенко

Background of the issue:
I have products updated through WordPress API in the original language. We use variations and hide products that are out of stock, with stock status coming from API sync. With the original language, everything is fine, but translated products are not updated automatically. To update translated products, I have to open WPML on the site admin panel, pause and start autotranslate, which syncs the translated product after some time. I am looking for a way to do this automatically without pressing a button every day and keeping the WP admin open. As a minimum, I need some code for functions.php to disable translated products when the original is gone, or any other way to solve the issue.

Symptoms:
Translated products and stock status are not updated automatically, resulting in unwanted out-of-stock translated products on the site.

Questions:
How can I set up automatic translation updates every day without manual intervention?
Can you provide code for functions.php to disable translated products when the original is out of stock or some better solution for the issue?

December 25, 2024 at 12:53 pm #16545421

Itamar
WPML Supporter since 02/2016

Languages: English (English )

Timezone: Asia/Jerusalem (GMT+02:00)

Hi,

To achieve this, you must also use your API calls on the translated products. WooCommerce Multilingual is compatible with the WordPress REST API. Using the REST API, you can create, read, update, and delete translated WooCommerce content. Please read about it in our developer guide here.

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

Please let me know if you have any further questions.

Please share your site's Debug information if you need further help with this issue. You can read about it here.

http://wpml.org/faq/provide-debug-information-faster-support/

Regards,
Itamar.

The topic ‘[Closed] I need autotranslate every day (automatic) how?’ is closed to new replies.