Docs Measurement Price Calculator for WooCommerce

Shortcodes

Shortcodes#

Embed pricing tables anywhere on your site using the [mpwc_pricing_table] shortcode. Display a product’s tiered pricing in any page, post, or widget area.

Available shortcodes#

ShortcodeDescription
[mpwc_pricing_table]Display a product’s pricing table with tier ranges and prices

[mpwc_pricing_table]#

Displays the pricing table for a specific product, showing all pricing tiers with their measurement ranges and per-unit prices. Sale prices are shown with strikethrough formatting when active.

Attributes#

AttributeValuesDefaultDescription
idProduct IDRequiredThe WooCommerce product ID to display pricing for

Examples#

[mpwc_pricing_table id="123"]

Display the pricing table for product #123.

[mpwc_pricing_table id="456"]

Display the pricing table for product #456.

Notes:

  • The id attribute is required. The shortcode won’t display anything without a valid product ID.
  • The product must have pricing rules configured in the Measurement tab.
  • If the product has no pricing rules, nothing is rendered.

What the table shows#

ColumnContent
RangeMeasurement range with unit (e.g., “1 - 99 sq ft”, “100+ sq ft”)
PricePer-unit price. Shows sale price with regular price strikethrough when a sale is active

Sale price display#

When a pricing tier has an active sale:

  • Regular price appears with a strikethrough: $5.00
  • Sale price appears next to it: $4.25

Sale prices respect the Sale From / Sale To date ranges configured in the pricing rules.

Use cases#

Product landing pages#

Create a dedicated page for a product with detailed information and pricing:

<h2>Hardwood Flooring Pricing</h2>
<p>Volume discounts available on all hardwood flooring orders.</p>
[mpwc_pricing_table id="123"]
<p><a href="/product/hardwood-flooring/">Order Now →</a></p>

Comparison pages#

Show pricing for multiple products side by side:

<h2>Flooring Options</h2>

<h3>Oak</h3>
[mpwc_pricing_table id="101"]

<h3>Maple</h3>
[mpwc_pricing_table id="102"]

<h3>Pine</h3>
[mpwc_pricing_table id="103"]

Blog posts#

Reference pricing in informational content:

When planning your flooring project, check our current pricing tiers:
[mpwc_pricing_table id="123"]

Add a pricing reference in a text widget:

[mpwc_pricing_table id="123"]

Styling#

The pricing table shortcode uses the same CSS classes as the product page pricing table. All elements are prefixed with mpwc-.

CSS classes#

ElementCSS Class
Table container.mpwc-pricing-table
Table header row.mpwc-pricing-table th
Table body rows.mpwc-pricing-table tr
Active tier row.mpwc-pricing-table .mpwc-active-tier
Regular price.mpwc-pricing-table .amount
Sale price.mpwc-pricing-table ins .amount
Strikethrough price.mpwc-pricing-table del .amount

Theme overrides#

To customize the pricing table template, copy templates/single-product/pricing-table.php from the plugin to yourtheme/mpwc-calculator/single-product/pricing-table.php. Your theme copy will be used instead.

Auto-enqueuing#

When the shortcode is used on a page, the plugin automatically enqueues the pricing table CSS. No manual asset loading is needed.

Tips#

  1. Use on landing pages to show pricing without requiring customers to visit the product page.
  2. Combine with product links so customers can click through to order.
  3. Update pricing in one place - changes to the product’s pricing rules automatically update everywhere the shortcode is used.
  4. Works with page builders - Elementor, Divi, Beaver Builder, and other builders that support shortcodes.