Table of Contents
Problem Description #
When you enable decimal/min‑step quantity options (e.g. 0.5, 1.25) and your store uses the new block-based cart/checkout of WooCommerce, you might see fatal errors or the plugin simply stops working for decimals.
Common Symptoms – Error Messages:
- “Fatal error: Uncaught DivisionByZeroError: Modulo by zero” in a WooCommerce core file when using decimal quantities. WordPress.org+1
- Decimal input rounding down to integer (e.g. 1.5 → 1) after navigation or cart update. WordPress.org+2WordPress.org+2
- Decimal quantities accepted on product page but cart/checkout resets to whole numbers or fails. WordPress.org+2WordPress.org+2
Cause:
- The plugin’s decimal‑quantity support conflicts with WooCommerce’s block-based Cart/Checkout system, which (as of writing) does not reliably support decimals. Plugin authors have confirmed this limitation. WordPress.org+1
- Decimal math + quantity normalization routines may trigger a division/modulo error when WooCommerce attempts to normalize cart items , particularly when the code assumes integer quantities. WordPress.org+1
Solution (step-by-step)
- Switch your cart/checkout to classic (legacy) mode.
- Edit your Cart and Checkout pages and ensure they use the shortcodes and rather than block-based templates. Many reports show decimals work when using classic. WordPress.org+1
- Edit your Cart and Checkout pages and ensure they use the shortcodes and
- Test with a default theme and only WooCommerce + Min Max plugin active.
- This avoids conflicts with other plugins and custom theme templates.
- Ensure your Min Max plugin is updated to the latest version. Developers sometimes release patches to improve decimal handling. WordPress.org+1
- If you must use block-based cart/checkout, avoid decimal quantities for now , use integer-only quantities or postpone decimal orders until decimal support is stable.
- Report to plugin developers if decimals are essential , include WooCommerce version, PHP version, and whether you use block-based or classic cart.
Prerequisites
- Min Max plugin latest version.
- WooCommerce version compatible with plugin (check tested up to version in plugin changelog). WordPress.org+1
- Many users on the forum opted to revert to classic cart/checkout to restore decimal support , this remains the most reliable workaround as of now.
- Decimal quantities inherently increase complexity (stock math, normalization, compatibility). Use them only when necessary and test thoroughly.
