Global Rules

Global Rules

Global rules let you apply default calculator settings to entire product categories at once, instead of configuring each product individually. Products that don't have explicit calculator settings automatically inherit their category's defaults.

How it works

  • You configure calculator defaults on a product category.
  • Any product in that category without its own calculator settings inherits the category defaults.
  • Products with explicit settings always take priority over category defaults.
This is useful when you have dozens of products that all use the same calculator type and pricing unit.

Setting up category defaults

  • Go to Products → Categories.
  • Click on a category name to edit it (or click Edit under the category).
  • Scroll down to the Measurement Calculator Defaults section.

Available settings

SettingDescription
Calculator TypeDefault type for products in this category (e.g., Area)
Pricing UnitDefault pricing unit (e.g., sq ft)
Pricing LabelDefault label (e.g., "per sq ft")
Overage %Default waste buffer percentage
Scroll to see all columns →
  • Configure the defaults and click Update.

Inheritance rules

The plugin uses a three-level settings hierarchy:

PrioritySourceWhen used
1 (highest)Product settingsWhen the product has a calculator type explicitly set
2Category settingsWhen the product has no calculator type but its category has defaults
3 (lowest)Global settingsDefault units from WooCommerce → Settings → Measurement Calculator
Scroll to see all columns →

How it resolves

  • The plugin checks the product for a saved calculator type.
  • If the product has one, those settings are used (category defaults ignored).
  • If the product has no calculator type, the plugin looks at the product's categories.
  • If a category has defaults, those are applied.
  • If multiple categories have defaults, the first match is used.
Tip: A product is considered "unconfigured" if it has no calculator type selected. Once you select a type on the product and save, it's considered configured and won't inherit from the category.

Bulk apply tool

When you set up category defaults, you can also apply them to all existing unconfigured products in that category at once.

Using bulk apply

  • Go to Products → Categories and edit a category.
  • Set up the calculator defaults.
  • Click Update to save the category settings.
  • Click the Apply to All Products button.
  • A confirmation dialog appears: "Apply these calculator defaults to X unconfigured products in this category?"
  • Click OK to proceed.

What bulk apply does

  • Finds all products in the category that don't have a calculator type set.
  • Copies the category's calculator type, pricing unit, pricing label, and overage to each product.
  • Products that already have a calculator type are skipped (their settings are preserved).
  • A success message shows how many products were updated.

What bulk apply doesn't do

  • It doesn't overwrite existing product settings.
  • It doesn't copy pricing rules (those are product-specific).
  • It doesn't apply to products in sub-categories (only direct members).
  • It doesn't apply to variable product variations (only the parent product).

Use cases

Flooring store

All flooring products use the same calculator:

CategoryTypeUnitOverage
Hardwood FlooringArea (L×W)sq ft10%
TileArea (L×W)sq ft15%
CarpetArea (L×W)sq yd10%
Scroll to see all columns →

Hardware store

Different categories need different calculators:

CategoryTypeUnitOverage
FencingDimensionft5%
Mulch & SoilVolumecu yd0%
PaintRoom Wallssq ft10%
CountertopsArea (L×W)sq ft0%
Scroll to see all columns →

Fabric store

All fabrics priced the same way but with different units:

CategoryTypeUnitOverage
Quilting CottonDimensionyd0%
Upholstery FabricDimensionm5%
Outdoor FabricDimensionyd0%
Scroll to see all columns →

Removing category defaults

  • Go to Products → Categories and edit the category.
  • Set the Calculator Type back to "None" (the first option).
  • Click Update.
Products that were already configured from bulk apply keep their settings. Only future inheritance is affected.

Best practices

  • Set up categories before products. Configure your category defaults first, then let new products inherit automatically.
  • Use bulk apply for existing products. After setting category defaults, use the bulk apply button for unconfigured products.
  • Override at the product level when needed. Individual products can always have different settings from their category.
  • Keep categories focused. If products in a category need different calculator types, consider splitting into sub-categories.
  • Document your defaults. Keep a note of which categories have which defaults for your team.

Troubleshooting

Product not inheriting category defaults

  • Check the product doesn't have a calculator type already set (even if it's saved as "None" explicitly).
  • Verify the category has defaults configured.
  • Check the product is assigned to the correct category.

Bulk apply didn't update a product

  • The product likely already has a calculator type set. Bulk apply skips configured products.
  • To force a reset: edit the product, set calculator type to "None" (or remove the _mpwc_calculator_type meta), save, then run bulk apply again.

Category defaults showing on wrong products

  • Check if the product belongs to multiple categories with different defaults.
  • The first matching category's defaults are used.