Skip Navigation

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

Problem: Client's stock was not syncronizing because of this bug: https://onthegosystems.myjetbrains.com/youtrack/issue/wpmlsupp-6347 Solution: The client was informed that it was a known bug and developers were already working on it. Besides, a workaround was offered, consisting of copying the _stock custom field of the Product. Relevant Documentation: https://onthegosystems.myjetbrains.com/youtrack/issue/wpmlsupp-6347#focus=streamItem-102-335940.0-0

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.

This topic contains 3 replies, has 2 voices.

Last updated by Oscar Miras 1 year, 9 months ago.

Assigned support staff: Oscar Miras.

Author Posts
March 23, 2019 at 12:14 pm #3446301

rufusB

I am trying to: synchronise stock

Link to a page where the issue can be seen: hidden link

I expected to see: "Hay existencias" or "Solo quedan (xxx number) disponibles"

Instead, I got: Solo quedan disponibles

Stock numbers are randomly not copying correctly since a WP or Woocommerce update some time ago. Existing products are not affected and sometimes it works on new products. I've tried altering those products affected using simple and variable products, managing stock at product and variation levels and not managing stock at all. It has no effect.

It now turns out that these products cannot be purchased in the translated language. When added to cart they return a message saying insufficient stock remains.

March 23, 2019 at 3:13 pm #3446709

Oscar Miras

Hi,

Welcome to the WPML support team.

This is a known issue and our developers are working on it. A fix for this issue is currently under review. I will update this ticket as soon as I have any news.

In the meantime, there is a temporary workaround that you may try in order to solve this issue. Please, perform a full backup of your site before applying this configuration.

  • Go to WPML > Settings.
  • Open the Custom XML Configuration tab.
  • Add next code to your Custom XML configuration and save changes.
<wpml-config>
    <custom-fields>
        <custom-field action="copy">_stock</custom-field>
    </custom-fields>
</wpml-config> 

In case you try the workaround, let me know if that fixes your problem.

Thank you for your patience.

Best wishes,
Óscar.

March 24, 2019 at 3:01 pm #3448523

rufusB

My issue is resolved now. Thank you!

April 3, 2019 at 2:44 pm #3527431

Oscar Miras

There is a new version of Woocommerce Multilingual and WPML core plugins.
Please, update these two plugins. The stock synchronization bug should be resolved.

After updating the plugins, please remember to remove the custom XML configuration in case your set it up.

1. Go to WPML > Settings.
2. Open the Custom XML Configuration tab.
3. Remove the XML configuration:

<wpml-config>
    <custom-fields>
        <custom-field action="copy">_stock</custom-field>
    </custom-fields>
</wpml-config> 

Thank you for your patience.

Best wishes,
Oscar.