Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
You are trying to display product categories in your shop using a specific code, but after a recent update, the category slugs are not switching languages correctly. The issue results in the category slug showing as /product-category/(category) instead of using the language-appropriate slug.
Solution:
We identified that the slug for the product categories had been translated, but the singular and plural names were not. We added those missing translations for completeness. After saving, the "View" links should now correctly use the translated slug. You should translate these on this page.

If this solution does not resolve your issue or seems irrelevant due to being outdated or not applicable to your case, we recommend opening a new support ticket. We also 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.

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.

Tagged: 

This topic contains 5 replies, has 1 voice.

Last updated by oliverR-34 5 days, 6 hours ago.

Assisted by: Bruno Kos.

Author Posts
July 9, 2025 at 7:36 pm #17220817

oliverR-34

Background of the issue:
I am trying to display product categories in my shop using a simple code: <code>$terms = get_terms( array('taxonomy' => 'product_cat', 'hide_empty' => true, ) ); foreach ( $terms as $term ) { $term_link = get_term_link($term); }</code>. However, after a new update, the category slugs are not switching languages correctly. The issue can be seen on this page: hidden link.

Symptoms:
On every language, the category slug is showing as /product-category/(category) instead of using the language-appropriate slug. Even when switching to English, it still shows 'product-category' as the slug, which is correct. Rolling back to the previous version resolves the issue, and on Estonian, the links appear correctly as /tootekategooria/(category).

Questions:
Why are the category slugs not switching languages correctly after the update?
How can I fix the language slug issue without rolling back to the previous version?

July 9, 2025 at 7:45 pm #17220865

oliverR-34

Edit: I rolled back the woocommerce wpml plugin currently on the live site, and updated to new version on on dev site: hidden link and the issue is the same there

July 10, 2025 at 8:47 am #17222515

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

To help us investigate further, could you please recreate the issue on the following sandbox site?

hidden link

Please install your theme there, add the code you're using, and create 1–2 product categories. Then, translate the category slugs so we can clearly see how the issue appears.

I already installed WPML and WooCommerce and configured both.

July 10, 2025 at 7:12 pm #17225585

oliverR-34

Hey

I did what you asked and the issue is the same on the sandbox page. I've attached a screenshot where I confirm that.
I also saw that you already translated the product-category slug to german, or maybe that was automatically, anyways it's not translated when I try to view the category.

Kuvatõmmis 2025-07-10 221134.png
July 14, 2025 at 8:08 am #17232047

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

I am checking this with our 2nd tier and will keep you posted.

July 14, 2025 at 11:05 am #17233314

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

Our 2nd tier support team identified that the slug for the product categories had been translated, but the singular and plural names were not.

We went ahead and added those missing translations for completeness, and after saving, that the "View" links are now correctly using the translated slug.

These are to be translated on hidden link.

Does it work on your site?

plural singular.jpg
July 15, 2025 at 12:52 pm #17237774

oliverR-34

Yes this worked, thank you!