Skip to content Skip to sidebar

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);

Leave a Reply

Please stay on topic and be respectful to others. If you need help with issues not related to this post, use our Support Forum to start a chat or submit a ticket.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>