Problem: You are experiencing an issue where all product categories are displayed in the original version of your store, but in the Russian version, half of the categories are missing. These categories are translated and function correctly but do not appear on the store page. Solution: We recommend trying the following workaround: 1. Add the following code to your
functions.php
file inside your theme folder:
testfix();<br />function testfix(){<br /> global $wpdb;<br /> $elements = $wpdb->get_results("SELECT `element_id`<br />FROM {$wpdb->prefix}icl_translations<br />WHERE `element_type` = 'tax_product_cat' ORDER BY `trid`");<br />foreach ($elements as $element){<br /> $testelement = get_term_meta($element->element_id, 'order', true);<br /> if ($testelement == ""){<br /> add_term_meta($element->element_id, 'order', 0);<br /> }<br />}<br />}
2. Set the sort to category order in the widgets. 3. Visit the front end once. 4. Delete the code from the
functions.php
file after checking.
Please ensure to backup your site before implementing this test to avoid any potential issues.
If this solution does not resolve your issue or seems irrelevant due to being outdated or not applicable to your case, we 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. If needed, please open a new support ticket at WPML support forum for further assistance.