Open
Reported for: WPML Multilingual CMS 4.6.15
Overview of the issue
When translating taxonomies that are set as child of some parent category, the hierarchy of child- parent categories is not synced to translated categories.
Workaround
Please, make sure of having a full site backup of your site before proceeding.
- Edit the …/wp-content/plugins/sitepress-multilingual-cms/inc/wpml-post-edit-ajax.class.php
- Look for line 18
- Replace:
global $sitepress; - With:
global $sitepress, $wpdb; - Then, just before the line:
$sitepress->get_wp_api()->wp_send_json_success( $new_term_object ); - Add the following code:
$sync = new WPML_Term_Hierarchy_Sync($wpdb);
$sync->sync_element_hierarchy($taxonomy);