Hi Bricks team,
I found another inconsistency with WooCommerce variable products that seems very similar to the recently fixed SKU issue:
The Product Stock element and the {woo_product_stock} dynamic data currently return the parent product stock (the summed stock across all variations), even when a variation is selected.
For example:
-
Red: 1 in stock
-
Gree: 1 in stock
{woo_product_stock} returns:
2
for the currently selected variation.
Since the selected variation already defines the active product context (price, SKU, availability, etc.), I would expect the stock value to behave the same way and return the stock quantity of the selected variation instead of the summed parent stock.
This seems inconsistent with WooCommerce’s default behavior and with the recently fixed {woo_product_sku} issue.
Additionally, the Bricks Cart element already behaves correctly. It displays the stock quantity of the currently selected variation instead of the summed parent stock.
For consistency, I would expect the Product Stock element and {woo_product_stock} dynamic data to use the same logic.
Is this a bug?