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.

This topic contains 1 reply, has 2 voices.

Last updated by Dražen 1 year, 6 months ago.

Author Posts
June 8, 2023 at 3:14 pm #13794213

mykolaL-4

Good day! I have programmatically created two products in different languages.
1) Are there any features for programmatically combining products?
2) Perhaps there is a way not to create two products separately, but to add one product and programmatically duplicate it for the desired language?

June 9, 2023 at 8:24 am #13797601

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hello,

1) Yes, you can use the next hook to update language information and connect translations:
- https://wpml.org/wpml-hook/wpml_set_element_language_details/

2) You can check the next hooks for duplicating posts:

- https://wpml.org/wpml-hook/wpml_make_post_duplicates/
- https://wpml.org/wpml-hook/wpml_admin_make_post_duplicates/

Other WPML hooks and filters you can use:
- https://wpml.org/documentation/support/wpml-coding-api/wpml-hooks-reference/

Hope it helps.

Regards,
Drazen

The topic ‘[Closed] Programmatically duplicate/connecting products’ is closed to new replies.