Skip Navigation

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 11 replies, has 2 voices.

Last updated by Bruno Kos 4 months, 2 weeks ago.

Assigned support staff: Bruno Kos.

Author Posts
April 25, 2020 at 5:48 am #5991203

Maximilien HAIBI

Hello

I am facing issue with main language Product variation stock, i see _stock value in database but its display 0 in admin variation stock field,

I troubleshoot, but its not resolve my issue,
- WooCommerce -> WooCommerce Multilingual -> Status -> Troubleshooting -> Sync product stock quantity and status ( synchronizing min stock between translations ) -> Start

Please find attach images for more ref.

This stock and product sync from third party API, I face this issue many times but could not get exact reason.

All wpml plugin are up to date,

Please help me to resolve this issue,

Thanks

April 28, 2020 at 7:22 am #6008773

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

Thank you for contacting WPML support!

What is the stock amount if you deactivate WPML and WooCommerce Multilingual? Also, stock values of variations are not stored within the main product ID, because variations have individual values within database.

For example, if a main product has database ID of 50 and has 3 variations, these 3 variations will have unique IDs on their own so you will want to check their stocks there.
https://wordpress.stackexchange.com/questions/113965/how-does-woocommerce-store-variation-attributes-and-how-can-they-be-retrieved-p

Regards,
Bruno Kos

April 28, 2020 at 9:40 am #6009849

Maximilien HAIBI

Hello Bruno

Thanks for your reply,

I deactivate WPML and WooCommerce Multilingual, still showing stock 0.

Can you convert this ticket to chat support as we are in urgency and need solution ASAP

thanks

April 28, 2020 at 9:46 am #6009935

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

According to your feedback, the issue is not related to WPML, so you'll have to find another solution for this.

It is possible that whichever 3rd part API you are using is not filling up these values properly, not even original products so you will have to debug their and consult their support or development.

You can also confirm this by deactivating WPML and performing an update of these products and checking whether the stock is updated or not.

Since looks like something complex, I also suggest you reach out our contractors:
https://wpml.org/contractors/

Regards,
Bruno Kos

April 28, 2020 at 12:21 pm #6012317

Maximilien HAIBI

Thanks Bruno for your quick reply,

I see its working when i blank update product,

There are many products where i face same issue,
As i said, I did Troubleshooting
"- Sync product stock quantity and status ( synchronizing min stock between translations ) 0 left
- Fix translated variations relationships
- Sync removed product meta from original products to translations "

but its not resolve, is there something else I have to do?

Thanks

April 28, 2020 at 12:59 pm #6012557

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

Most likely these fields were not created in translated products through that third-party API, so WCML troubleshooting functions can't fill in missing fields.

The only way could be trying with bulk update like this or updating every original product one at a time.

Regards,
Bruno Kos

May 2, 2020 at 6:52 am #6042595

Maximilien HAIBI

Hello Bruno

I did
- First I check stock issue by blank update product with wpml but it was not worked.
- Then I disable WPML plugins and run cron for update stock in product it was work
- I re enable WPML plugins
- Then check other product, did blank update and it works with enabled WPML again

I debug with third API, its good, update stock i see in databse

Is there some new fields in wpml related to attributes ?
I am sure something related to wpml, As its working fine without wpml

How we can figure out this strange issue ?

Thanks

May 4, 2020 at 5:30 am #6049957

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

WCML or WPML does not store any particular data within other database tables - everything is stored within wp_postmeta when it comes to products. Perhaps the best course for you to find out why something is missing is by comparing broken and original products and see if you can manage your API to create or update these fields properly.

Check by post ID within both languages and for broken products and the ones working in all the scenarios. There could be only some particular meta_key missing, that would be the only correct approach if you ask me.

Regards,
Bruno Kos

May 4, 2020 at 6:33 am #6050141

Maximilien HAIBI

Ok, i will review for both,
Please don't close this ticket..

May 4, 2020 at 6:51 am #6050289

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

Ok. Apart from that, this is how WPML tables are managed:
https://wpml.org/documentation/support/wpml-tables/

However, specific product data is stored according to WordPress and WooCommerce, that is why I would compare it individually to find out what is going on.

Regards,
Bruno Kos

May 6, 2020 at 12:34 pm #6070527

Maximilien HAIBI

Hello Bruno

We have compare tables(postmeta), nothing difference.

We get good enough data from 3rd Party API,
We used wordpress API WP_REST_Request v2 (attached screenshot), data sent properly.

I see sometimes its working fine with WPML, sometime not.

Can we find root of the issue ?

Thanks

May 6, 2020 at 12:49 pm #6070661

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

I see sometimes its working fine with WPML, sometime not.

You mean it works (after testing) properly for the same products, or it works for some product and is not working properly for others, or?

Are you able to identify what is the difference between working and nonworking? Maybe the type of product, assigned categories, taxonomies and/or products translated or not? There must be some detail.

Regards,
Bruno Kos

The topic ‘[Closed] Product variation stock issue’ is closed to new replies.