Skip Navigation

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

Problem:
You are trying to import Spanish translations for an existing English custom post type using WP All Import. The necessary custom meta fields are included in the import CSV, but after running the 'Run WPML Import' button, the translated post objects are not associated with the original language post.
Solution:
First, ensure that you import default language posts and then import translated posts. WPML will then connect them based on the same WPML information set in the sheet. If this does not resolve the issue, you can manually connect them or use the following hook to automate the process:

https://wpml.org/wpml-hook/wpml_set_element_language_details/

If this solution does not apply to your case, or if it seems outdated, we recommend opening a new support ticket. We also highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. For further assistance, please visit our support forum at https://wpml.org/forums/forum/english-support/.

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.

Tagged: 

This topic contains 1 reply, has 0 voices.

Last updated by hayesP 4 months ago.

Assisted by: Dražen.

Author Posts
March 6, 2025 at 9:26 pm #16785450

hayesP

Background of the issue:
I am trying to import Spanish translations for an existing English custom post type using WP All Import. The necessary custom meta fields (_wpml_import_translation_group, _wpml_import_language_code, _wpml_import_source_language_code) are included in the import CSV. _wpml_import_translation_group is set to the value generated by exporting the original language objects using WP All Export, _wpml_import_language_code is set to es, and _wpml_import_source_language_code is set to en.

Symptoms:
After completing the import using WP All Import, WPML Export and Import detects the imported post objects and offers the 'Run WPML Import' button. Clicking this button runs with no errors, but the translated post objects are not associated with the original language post. I can manually associate each translated post with the original, but this is not feasible for the number of items that need to be imported.

Questions:
Is there anything we are missing for WPML Export and Import to correctly associate the imported translations?

March 10, 2025 at 7:42 am #16794600

Dražen
Supporter

Languages: English (English )

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

Hello,

Thanks for contacting us.

This only works if you also import default language posts and them import translated posts; then, WPML will connect them based on the same WPML information that was set inthe sheet.

Other then that, the only way is to connect them manually, or you can usethe next hook:

- https://wpml.org/wpml-hook/wpml_set_element_language_details/

Regards,
Drazen

March 10, 2025 at 1:02 pm #16796614

hayesP

Thank you for this information. This was not clear on the WP Export and Import plugin documentation, and we were hopeful that WP Export and Import was going to be more useful than the legacy WP All Import plugin.