Hi!
Please help me get around the following problems, both regarding displaying as on stock, but they actually are out of stock!
- When we view the woocommerce shop, it has a nice feature, that it displays available sizes when you hover over product – can it be set, that it only display sizes that are actually on stock?
- I would also like to ad a filter by size to sidebar, that should also display only products that have this variation on stock.
Regarding those problems, I have found the following information on the internets from 2 years ago, saying that this would be resolved with version 4. of woocommerce:
This is currently a ‘wontfix’ item – I’ll briefly explain why it’s not possible to do this at this point.
Attributes (your shoe sizes) are terms.
The terms are not directly tied to a ‘variation’, they are tied to a parent variable product.
When querying products using widgets like layered nav, they look at the parents only. They cannot look at the variations because the variations are not assigned to the term.
Since the query cannot look at the variation, it cannot check its stock level and exclude it.
In the future we may try to revisit this, but as it stands, looping over all variations during layered nav queries would be a massive bottleneck and would cause too large of a performance issue to warrant it’s inclusion. It may be possible once product tables are in WooCommerce core, but right now it’s not possible.
I have updated to the latest version, but this still does not work right 🙁
Can you please point me in a direction on how to resolve this issue?
This is very problematic, because everyone expects, that by filtering by size you would get a list of shoes in selected size, that are available to order.