@devs - First of all thanks for awesome product - bricks rocks.
Issue:
Using Woocommerce dynamic data {woo_product_stock:value} to display stock QTY - works as it should, BUT when stock is on “back order” ( where Woocommerce sees it as a negative number) it still displays as positive number.
or as @MatejMohar eloquently put it to me in the discord: “As Bricks always returns absolute value, that’s why instead of -20 it returns 20. That way you can’t even have conditions to check if value is negative”
As I’m not an e-commerce or WooCommerce expert I’m hearing of this backorder term for the first time. But yeah. In this case this sounds like a bug to me. However, I will leave this report on WAIT for now and get some feedback internally.
Same this side. I have not worked with WOO too much - we discovered it when clients demanded stock we don’t have
I believe the absint() might be the issue there. as it forces the number positive (I think)
The other big question it what should it return when it is negative - maybe it should be something that can be fed into the dynamic data term something like
{woo_product_stock:value:0} returns a 0 for negative stock value
{woo_product_stock:value:No stock }" returns a “No stock” for negative stock value
{woo_product_stock:value:On back order }" returns a “On back order” for negative stock value