Skip Navigation

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
- 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 -
- 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 1 reply, has 2 voices.

Last updated by Long Nguyen 1 month, 1 week ago.

Assisted by: Long Nguyen.

Author Posts
August 19, 2024 at 8:11 am #16082352

sergeyT-8

Background of the issue:
I have a WooCommerce + WPML site under development. I have all my translations ready and prepared. I have a lot of products and I don't want to copy/paste translations manually. I'm trying to write a command line PHP script to load my translations.

Symptoms:
I can't find the correct functions I need to use in the WPML API documentation.

Questions:
Where can I find the documentation for loading translations using a PHP script with WPML?
What WPML API functions should I use to automate loading translations for WooCommerce products?

August 19, 2024 at 8:49 am #16082474

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

I suggest you follow the documentation below to use the action hook "wpml_set_element_language_details" to create the post and its translation with code
https://wpml.org/wpml-hook/wpml_set_element_language_details/

Let me know if it helps.

The topic ‘[Feature Request] I want to load my translations not manually but using a PHP script. Need documentation, can't find …’ is closed to new replies.