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.
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
| Setting | Description |
|---|---|
| Calculator Type | Default type for products in this category (e.g., Area) |
| Pricing Unit | Default pricing unit (e.g., sq ft) |
| Pricing Label | Default 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:
| Priority | Source | When used |
|---|---|---|
| 1 (highest) | Product settings | When the product has a calculator type explicitly set |
| 2 | Category settings | When the product has no calculator type but its category has defaults |
| 3 (lowest) | Global settings | Default 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.
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:
| Category | Type | Unit | Overage |
|---|---|---|---|
| Hardwood Flooring | Area (L×W) | sq ft | 10% |
| Tile | Area (L×W) | sq ft | 15% |
| Carpet | Area (L×W) | sq yd | 10% |
Scroll to see all columns →
Hardware store
Different categories need different calculators:
| Category | Type | Unit | Overage |
|---|---|---|---|
| Fencing | Dimension | ft | 5% |
| Mulch & Soil | Volume | cu yd | 0% |
| Paint | Room Walls | sq ft | 10% |
| Countertops | Area (L×W) | sq ft | 0% |
Scroll to see all columns →
Fabric store
All fabrics priced the same way but with different units:
| Category | Type | Unit | Overage |
|---|---|---|---|
| Quilting Cotton | Dimension | yd | 0% |
| Upholstery Fabric | Dimension | m | 5% |
| Outdoor Fabric | Dimension | yd | 0% |
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.
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_typemeta), 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.