Problems with Product Category conditions not working on WooCommerce WPML site

I’m building a bilingual online store using WooCommerce and WPML. I have run into problems when trying to use conditions relating to Product Category’s.

I have been working on the layout for my store and category pages, which from what I can understand should work with the same WooCommerce Archive layout (the one set to store, is also used for all category pages unless overridden). I really want the Product Category Archive condition to do what I need, below you will see that its not working. In the process of trying things I found what seems to me to be a bug with the Product Category condition as well, when working with a WPML site.

Product Category Archive - Condition not working at all

When I set a condition of Product Category Archive : is being viewed I would expect that element to show up an all Product Category Archive pages but not on the main store page. What is actually happening is the element isn’t showing anywhere (not on category archive pages or the main store page).


Example of a Product Category Archive page in both languages, element with condition is missing.

Product Category - Condition not applying to all languages

If I switch the condition to Product Category : Category Name the element does show up on the archive page for the chosen category, but only in one language (not the translated version of the archive page).

The dropdown selector only lets me select a Product Category in the language my WP Admin user has chosen for the backend. I am building a site that is Spanish first, with English translation, but I have my admin user set to prefer English, so in my case the Product Category dropdown in the condition editor only shows the English Category Names, this wouldn’t matter if selecting a category would apply to both languages.

To test this I changed my WP Admin user language in the profile page from English to Spanish, and now when I go to conditions it displays in Spanish and lets me chose a category name in Spanish. The condition then only applies to the Spanish Category Page.


Example of Product Category Condition, options are language specific, only shows up in language chosen, chooser only shows language of admin user.

Hello Jeffrey,

Thanks for writing in!

You can only apply the conditions to English or Spanish. If a category, post, or layout does not have any translation yet, it falls back to the one you currently have. I would recommend that you build the site in English or Spanish first. Set all your conditions and then translate the site. In most cases, the conditions will also get translated automatically.

We would be happy to double check your site if we can log in. You can create a secure note in your next reply with the following info:
– Link to your site
– WP login URL
– WP username
– WP password
– WP Administrator Role
– Confirmation that we can access and make changes to your site

To know how to create a secure note, please check this out: How The Forum Works

image

Best Regards.

Your response doesn’t touch on why Product Category Archive conditions are not working at all.

As to building the site in one language and then translating, that is in essence what I am doing. I am building the site in Spanish, then using WPML to translate it to English. My categories are translated, are you saying I must set all conditions before I can do any translation? If that’s the case then how would continued development of the site work once an initial translation has been implemented (like in my case where I have translations of categories and of a few products?)

I’m developing locally so don’t have it on a publicly facing server yet, but let me work on getting it up on something so you can take a look at it (see if I can do that this week or if it will have to be early next week).

Hi Jeffrey,

The Product Category Archive : is being viewed condition should, by design, apply to all product category archive pages while excluding the main shop page. If it’s not showing up anywhere, that is a clear indicator of a configuration conflict rather than a bug with the condition itself.

Here is why this typically happens on a WPML site:

  • Layout Assignment Conflict: The most common cause is that the layout containing your element with the Product Category Archive condition is not actually assigned to the correct “Shop” page in Theme Options > Layouts.

  • WPML Translation Fallback: When WPML is active, the theme’s layout conditions rely on the master language (the default language set in WPML). If your layout is set to a specific language context or if there’s a mismatch in how the archive is registered, the condition can fail to trigger on translated pages.

How to Fix the Product Category Archive Condition

To make this work reliably, please follow this setup process carefully:

  1. Set the Condition on the Global “Shop” Layout

    • Go to Theme Options > Layouts.

    • Locate the layout that is assigned to your “Shop” page (this is usually the default WooCommerce archive layout).

    • Edit this layout and set its condition to Product Category Archive : is being viewed.

    • Crucially, ensure this same layout is assigned to the “Products” page in Theme Options. If no layout is explicitly assigned to the “Products” page, the condition won’t apply to category archives.

  2. Verify Your WPML Language Settings for Layouts

    • In WPML, go to WPML > Settings > Translated Documents.

    • Ensure that the option for “Page” (and any custom post types used for layouts) is set to “Translatable - use translation if available or fallback to default language”.

    • This setting is critical. It ensures that when a translated category page is viewed, WPML correctly applies the layout from the default language if a specific translated layout doesn’t exist.

You asked: “are you saying I must set all conditions before I can do any translation?”
No, you do not have to set all conditions before translating. The recommendation to build in one language first is a best practice for simplicity, but it is not a strict requirement.

  • How continued development works: Once you have translated categories and products, you can continue to develop and add new conditions. When you add a new condition on a Spanish category, for example, you will need to manually add the same condition to the English translation of that category. The condition does not automatically carry over because the IDs are different.

  • The most reliable approach: Set your layout conditions using the default language of your site (Spanish, in your case). Then, use WPML’s translation management to translate the layout itself if needed. If you translate the layout, you can then set the English-specific conditions on that translated layout.

Since you’re developing locally, when you are able to put the site on a publicly accessible server, please share the following details in a Secure Note (you can find the button at the bottom of your post):

  • WordPress Login URL
  • Admin-level username and password
  • Confirmation of which language is set as your default in WPML

This will allow us to log in and verify the layout assignments and WPML settings directly.

Thanks.