What's new at ShopWired?
New product and variation stock variables
The product.stock
and variation.quantity
variables return a non-negative integer of the current stock available on the product/variation. If the values are negative, they will return 0
.
New variables have been made available to return the true amount of stock, including a negative value if the stock available is negative.
product.raw_stock
Will return the current stock of the product, including a negative value.
variation.raw_quantity
Will return the current stock of the product variation, including a negative value.
The AJAX endpoint
The AJAX endpoint now includes a rawQuantity
property for the product / selected variation.