YourPlugins

Overwrite the WooCommerce quantity

Part of Spreadsheet tools.

All docs

If your spreadsheet calculates the final order quantity, you can tell the plugin to use a mapped output field as the WooCommerce product quantity.

This is available for spreadsheet-based calculators. When enabled:

  • the default WooCommerce quantity box is replaced by the calculator-driven quantity
  • stock management continues to use the resulting WooCommerce quantity value

How to overwrite product quantity

  1. Create or open a spreadsheet-based calculator. See Build a spreadsheet calculator.
  2. Create an output field that will hold the final quantity value.
  3. In Formula/Mapping, map the worksheet cell that contains the calculated quantity to that output field.
  4. In the WooCommerce Product Mapping section, set Product quantity to the output field you just mapped.
  5. Save the calculator.
  6. Test the result in Preview and then on a real product page before going live.
Note: the quantity override uses an output field, not an input field. The worksheet calculates the final quantity, and the plugin passes that value to WooCommerce.