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.
Elementor users - please update WPML to the latest version to maintain compatibility. More details here - https://wpml.org/changelog/2024/12/wpml-4-6-15-critical-update-for-elementor-sites/
Background of the issue:
I am trying to use the 'Copy taxonomy to translations' functionality with custom post types in WordPress. When using the WordPress Editor, the terms assigned to the original post are not being copied over to the translation. The functionality works fine with the 'post' post type. The 'Copy taxonomy to translations' setting is enabled, and the terms have been translated. I tested this on the 'twentytwentyfour' theme and encountered the same issue.
I did some digging and I believe the `add_hooks` method in the class `WPML_REST_Posts_Hooks` runs before custom post types are registered (before the 'init' action), so the hooks aren't being applied to them.
Symptoms:
Terms are not copied over to translations for custom post types, despite the setting being enabled and terms translated.