Pular para o conteúdo Pular para a barra lateral

Este tópico foi resolvido. Aqui está uma descrição do problema e da solução.

Problema:
Se você está usando o WPML com o WooCommerce e notou que um produto traduzido aparece como 'sem estoque', apesar de haver estoque no produto original, e também está enfrentando um problema onde o menu do cabeçalho aparece sob as imagens do produto nas páginas traduzidas, indicando um problema de z-index.
Solução:
Primeiro, verifique as configurações de tradução de campos personalizados em WPML > Configurações > Tradução de Campo Personalizado e clique em "Mostrar campos do sistema". Certifique-se de que o campo _stock esteja configurado para "Não traduzir". Os seguintes campos devem ser configurados para "Copiar":

  • total_sales
  • _backorders
  • _downloadable
  • _download_expiry
  • _download_limit
  • _manage_stock
  • _virtual
  • _weight
  • _width
  • _price
  • _regular_price
  • _sale_price
  • _sku
  • _sold_individually
  • _stock_status
  • _tax_class
  • _tax_status

O campo _purchase_note deve ser configurado para "Traduzir". Após ajustar essas configurações, atualize as traduções dos seus produtos.
Se ainda enfrentar problemas, pode ser necessário atualizar ou desativar temporariamente o plugin "CommerceGurus CommerceKit" e salvar novamente o produto original para sincronizar o estoque.

Se a solução fornecida não resolver o problema ou se parecer irrelevante devido a atualizações ou especificidades do seu caso, recomendamos que abra um novo ticket de suporte em fórum de suporte WPML. Também é altamente recomendável verificar problemas conhecidos em https://wpml.org/known-issues/, verificar a versão da correção permanente e confirmar que você instalou as versões mais recentes de temas e plugins.

Este é o fórum de suporte técnico para o WPML — o plugin de WordPress multilíngue.

Todos podem ler, mas apenas clientes do WPML podem postar aqui. A equipe do WPML responde no fórum 6 dias por semana, 22 horas por dia.

Marcado: 

Este tópico contém 7 respostas, tem 0 voices.

Última atualização: pedroS-52 1 semana atrás.

Assistido por: Andreas W..

Autor Posts
setembro 10, 2025 às 12:25 am #17389007

pedroS-52

Histórico da questão:
I am using WPML with WooCommerce on my site link oculto. I have a product created in Portuguese with available stock. After translating it into Spanish, the translated version appears as 'out of stock' even though the original has stock. I have confirmed that stock is available in the original product, the translation is correctly linked, and WPML and all related plugins are up to date. Additionally, on translated product pages, the header menu appears underneath the product images, indicating a z-index issue. Link to a page where the issue can be seen: link oculto

Sintomas:
The translated product shows as 'out of stock' despite the original having stock. The header menu appears underneath the product images on translated product pages, suggesting a z-index issue.

Perguntas:
Why does the translated product show as 'out of stock' when the original has stock?
How can I fix the z-index issue with the header menu on translated product pages?

setembro 10, 2025 às 12:55 am #17389054

Andreas W.
Apoiador do WPML desde 12/2018

Idiomas: Inglês (English ) Espanhol (Español ) Alemão (Deutsch )

Fuso horário: America/Lima (GMT-05:00)

Hello,

This sounds like a configuration issue. Please go to WPML > Settings > Custom Field Translation and click "Show system fields". Now in the bottom right corner, click to see all results or use the text search field to find specific fields:

Make sure that the field _stock is set to "Don't translate".

The following fields should be set to "Copy":

total_sales
_backorders
_downloadable
_download_expiry
_download_limit
_manage_stock
_virtual
_weight
_width
_price
_regular_price
_sale_price
_sku
_sold_individually
_stock_status
_tax_class
_tax_status

The field _purchase_note should be set to "Translate".

The following fields are by default set to "Don't translate":

_wcml_average_rating
_wcml_rating_count
_wcml_review_count
_wc_average_rating
_wc_review_count

Note, that it might be the case that you do not see all those fields yet, which means that they have not been used on the site yet.

Once the settings are adjusted, you need to update the translations if your products.

If you get an unexpected behavior using these default settings, then this might be due to custom code or a third plugin.

Let me know if further assistance is needed.

Best regards
Andreas

setembro 11, 2025 às 3:16 pm #17395004

pedroS-52

Hello Andreas,

I’ve checked the custom field translation settings you mentioned, and everything seems to be correctly configured.

To dig deeper, I’ve created a staging site. Would you mind taking a look there to verify?

Best regards,
Pedro

setembro 11, 2025 às 3:54 pm #17395063

Andreas W.
Apoiador do WPML desde 12/2018

Idiomas: Inglês (English ) Espanhol (Español ) Alemão (Deutsch )

Fuso horário: America/Lima (GMT-05:00)

Hello,

Sure, I would be glad to take a look into this.

I would like to request temporary access (wp-admin and FTP) to the staging site to investigate the issue further.

The required fields are located below the comments section when you log in to leave the next reply. The information you provide is private, meaning only you and I can see and access it.

IMPORTANT
Please be sure to back up your website and database before granting us access.
If you can't see the "wp-admin / FTP" fields, your post and website credentials will be set to "PUBLIC." DO NOT publish the data unless you see the required wp-admin / FTP fields.

The private reply form looks like this:
link oculto

Click "I still need assistance" the next time you reply.

Video:
link oculto

Please note that we are required to request this information individually on each ticket. We are not permitted to access any credentials that were not specifically submitted on this ticket using the private response form.

Best regards,
Andreas

setembro 11, 2025 às 5:14 pm #17395331

Andreas W.
Apoiador do WPML desde 12/2018

Idiomas: Inglês (English ) Espanhol (Español ) Alemão (Deutsch )

Fuso horário: America/Lima (GMT-05:00)

It seems like updating "CommerceGurus CommerceKit" solves this issue, but you will need to save the original product again afterwards, so that the stock gets synced.

setembro 11, 2025 às 8:35 pm #17395730

pedroS-52

I’ve updated CommerceGurus CommerceKit and re-saved the original product as suggested, but unfortunately the issue still persists. The translated product still shows as out of stock. I can see that on the staging is working.

setembro 11, 2025 às 9:34 pm #17395799

Andreas W.
Apoiador do WPML desde 12/2018

Idiomas: Inglês (English ) Espanhol (Español ) Alemão (Deutsch )

Fuso horário: America/Lima (GMT-05:00)

My apologies, maybe I might have misinterpreted the cause of the issue.

What I did on the staging was deactivate various WooCommerce addons, and on each step, I tested if the issue persisted while updating the stock and even retranslating the product.

At some point, suddenly, even the stock changed on the original product to "1", which made me even more curious that there might be an issue even when testing without WPML.

It seemed to me that the issue was solved when deactivated "CommerceGurus CommerceKit".

After that, I edited the original stick again, as it was suddenly set to "1", and when saving the original product, the issue was solved.

I did not update any other plugin, which means the issue might have solved itself after I deactivated one of the WooCommerce add-ons.

As the issue currently does not occur on the staging, it might be hard to find out which addon caused the issue.

If you would like to provide me with access to the live site, I could try to enable WP DEBUG to see if I can trigger an error that could answer this question, without the need to deactivate any plugins.

The private reply form is enabled again.

setembro 13, 2025 às 12:30 am #17398812

Andreas W.
Apoiador do WPML desde 12/2018

Idiomas: Inglês (English ) Espanhol (Español ) Alemão (Deutsch )

Fuso horário: America/Lima (GMT-05:00)

It was actually as I tested on the staging early.

I disabled "CommerceGurus CommerceKit" and the stock on the original product changed to "1". I then set the stock back to "372" and saved the original product again, and it solved the issue.

If this issue occurs again, please let me know, but after all, this does not seem to be an issue caused by WPML.

setembro 14, 2025 às 8:27 pm #17400335

pedroS-52

Ok, thank you! seems to be working now.

Regards
Pedro