If stock drops by a whole number after a decimal order, check that Decimal quantities is ticked at WPFactory > Quantity Manager > General in Min Max Step Quantity Limits Manager for WooCommerce and that rounding is off. WooCommerce stores stock as whole numbers, and only that setting switches stock to decimals.
Common symptoms #
- Stock decreases by a whole number even though a decimal quantity was ordered.
- Stock does not change at all for decimal-quantity line items.
- An order with a decimal quantity cannot change status.
- A product shows “Out of stock” or “In stock” at the wrong moment.
Cause #
WooCommerce passes every stock amount through a whole-number conversion. When Decimal quantities is enabled, Quantity Manager replaces that conversion with a decimal one (up to 6 decimal places) and recalculates the stock status after each stock change. If the setting is off, another plugin converts stock back to whole numbers, or a rounding option is on, decimal quantities are lost before they reach stock.
Fix #
- Enable decimals. In WPFactory > Quantity Manager > General, tick Decimal quantities and save. See How to enable decimal quantities.
- Enable managed stock on the product (WooCommerce Inventory tab) so quantities are tracked.
- Turn off rounding. In Advanced > Rounding Options, set Round on add to cart and Round with JavaScript to Do not round, unless whole-number stock is what you want.
- Use the classic Cart and Checkout (the
[woocommerce_cart]and[woocommerce_checkout]shortcodes), where decimal handling is most reliable. - Check other stock plugins. Inventory sync, point of sale or stock report plugins can convert stock back to whole numbers. Temporarily deactivate them on a staging copy and place a test order.
- Correct old orders by hand. Orders placed before decimals were enabled reduced stock in whole numbers, so adjust those products’ stock manually once.
- Update WooCommerce and Quantity Manager to the latest versions.
How stock status is decided #
After each stock change, the product is set to In stock while its stock is above WooCommerce’s Out of stock threshold (WooCommerce > Settings > Products > Inventory). At or below it, the product becomes On backorder if backorders are allowed, otherwise Out of stock. With a threshold of 0, a product with 0.5 left stays in stock.
Note: decimal stock accounting is inherently more complex. Test thoroughly with your theme and gateway before going live.
FAQ #
Does Quantity Manager support decimal stock? #
Yes, when Decimal quantities is enabled. Stock is then stored and reduced with up to 6 decimal places.
Can the out of stock threshold be a decimal? #
No. Quantity Manager reads the threshold as a whole number when it recalculates the stock status, so enter whole values there.
Can I keep the original quantity on each order line? #
Yes. Advanced > Save quantity in order item meta stores the quantity in an extra order item field (default key _wpfmmsq_qty).
Related: Cart or order page fails with decimal quantities.
Still stuck? Our team answers every ticket on the Quantity Manager support forum.
