Problem: The client reported inconsistencies in product sorting across different language pages on their WooCommerce site, even after previous code adjustments. Solution: We provided custom code to ensure consistent sorting by date, SKU, price, and popularity across all language versions of the site. Here are the steps we recommended:
//Use the below snippet when sorting by price and popularity, so that SKU is used as the secondary sort option:
add_filter('posts_clauses', 'custom_orderby_with_secondary_sku', 20, 2);
function custom_orderby_with_secondary_sku($clauses, $query) {
if (!is_admin() && $query->is_main_query() && is_woocommerce() && isset($_GET['orderby'])) {
$orderby = $_GET['orderby'];
// Define primary column and direction based on ordering
switch ($orderby) {
case 'price':
$primary_column = 'wc_product_meta_lookup.min_price';
$primary_direction = 'ASC';
break;
case 'price-desc':
$primary_column = 'wc_product_meta_lookup.max_price';
$primary_direction = 'DESC';
break;
case 'popularity':
$primary_column = 'wc_product_meta_lookup.total_sales';
$primary_direction = 'DESC';
break;
default:
return $clauses; // Not a target orderby value, leave alone
}
// Set ORDER BY with SKU as secondary sort
$clauses['orderby'] = "
{$primary_column} {$primary_direction},
wc_product_meta_lookup.sku ASC
";
}
return $clauses;
}
If this solution does not resolve your issue or seems irrelevant due to updates or specific circumstances, we recommend opening a new support ticket. Additionally, 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. For further assistance, please visit our support forum at WPML Support Forum.
Problem: You have enabled multi-currency mode in WPML and configured two currencies: DKK for Danish and EUR for English. However, the currency does not update when the language is changed. While the mini cart updates to EUR when switching to English, the rest of the site, including product listings and checkout, still displays prices in DKK. Solution: The issue arises due to a conflict between the "Enable Multi-Currency" setting in "WooPayments" and "WooCommerce Multilingual & Multi-Currencies". We recommend disabling the multi-currency option in the WooPayments settings and then testing the site again.
If this solution does not resolve your issue, or if it seems outdated or irrelevant to your case, please visit our known issues page and check for any related issues. Also, ensure that you have the latest versions of your themes and plugins installed. If the problem persists, we highly recommend opening a new support ticket with us for further assistance.
Problem: The client is experiencing an issue where incorrect country flags are displayed next to reviews on their WooCommerce site. Despite the reviews being in Polish, German flags appear when viewing the German version of the page. Solution: We have acknowledged this issue and published an erratum which can be found here: https://wpml.org/errata/woocommerce-product-reviews-country-flag-shows-in-current-language-instead-of-review-language/. This problem has been resolved in WooCommerce Multilingual & Multicurrency version 5.5.0. We recommend updating to this version to correct the display of country flags next to reviews.
If this solution does not resolve your issue or seems irrelevant, it might be because the information is outdated or not applicable to your specific 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 further assistance is needed, please open a new support ticket at WPML support forum.
Problem: На сайте клиента, использующего WPML, String Translation и WooCommerce Multilingual & Multicurrency, отсутствует раздел Troubleshooting в WooCommerce Multilingual & Multicurrency. Из-за этого клиент не может выполнить действия, такие как 'Synchronize featured products' и 'Regenerate product lookup tables'. Кроме того, бейдж 'Featured' не отображается на всех языках, когда таксономия product_visibility установлена как Непереводимая. Solution: Мы провели тесты и выяснили, что проблема связана с настройкой таксономии product_visibility как 'Переводить'. Вот шаги, которые мы предприняли для решения проблемы: 1. Установили плагин Adminer. 2. Изменили настройку product_visibility на Не переводить. 3. Удалили все языковые записи, связанные с product_visibility, из таблицы icl_translations. 4. Обновили тестовый товар, и он снова отобразился в каталоге. Чтобы восстановить отображение товаров на румынском языке, клиенту необходимо: 1. Открыть товар, который должен отображаться на румынском языке. 2. Убрать отметку 'Это рекомендуемый товар' и сохранить изменения. 3. Снова установить отметку 'Это рекомендуемый товар' и сохранить. 4. Товар снова появится в каталоге. Также рекомендуем проверить настройки в WooCommerce → WooCommerce Multilingual & Multicurrency → Состояние (Status) на предмет неправильных настроек.
Если данное решение не актуально или не подходит под ваш случай, рекомендуем открыть новый тикет поддержки. Также настоятельно советуем проверить известные проблемы, версию постоянного исправления и убедиться, что у вас установлены последние версии тем и плагинов.