Introduction
This page is for developers who want to adjust or extend Tiered Pricing Table for WooCommerce with code: read and change prices, override templates, hook into the JavaScript, use the REST API, and — most importantly — the complete list of actions and filters. Store-owner documentation lives in the User Guide.
Conventions
Code lives in the TierPricingTable\ namespace (src/), templates in views/. Every hook is prefixed with tiered_pricing_table/ and uses / as a separator, e.g. tiered_pricing_table/price/pricing_rule. Settings are options prefixed with tier_pricing_table_. Most filters can be hooked from a theme or plugin at any time; the three boot-time filters addons/list, integrations/plugins and integrations/themes run while the plugin file is included and must be hooked from a must-use plugin or a plugin loading before tier-pricing-table.
Prices and rules
Read the effective rule and price
use TierPricingTable\PriceManager;
$rule = PriceManager::getPricingRule( $product_id ); // TierPricingTable\PricingRule — product meta + role/customer/global rules applied
$rule->getRules(); // [ 5 => 9.5, 10 => 8.0 ] (fixed) or [ 5 => 10, 10 => 20 ] (percentage)
$rule->getType(); // 'fixed' | 'percentage'
$rule->getMinimum(); // ?int
$rule->provider; // 'product' | 'role-based' | 'user-based' | 'global-rules' | …
$rule->providerData; // e.g. [ 'rule_id' => 42, 'applying_type' => 'cross' ] or [ 'role' => 'wholesale' ]
$rule->data; // 'maximum_quantity', 'group_of_quantity', 'tier_labels', …
$rule->pricingData; // base-price overrides: regular_price, sale_price, discount, discount_type, pricing_type, tax_status, tax_class
$unit = $rule->getTierPrice( 12 ); // display price for qty 12 (false if below the first tier)
$unit = $rule->getTierPrice( 12, false, 'cart' ); // raw price, cart context
$has = ! empty( $rule->getRules() );
$has = \TierPricingTable\PricingTable::getInstance()->productHasPricingRules( $product ); // variable products too
Change the rule for any product
tiered_pricing_table/price/pricing_rule receives the PricingRule after product meta was read. Built-in providers use these priorities — pick yours relative to them: quantity limits 1, category rules 10, role-based 20, customer-based 25, global rules 30, request-a-quote 99, currency conversion 9999.
add_filter( 'tiered_pricing_table/price/pricing_rule', function ( \TierPricingTable\PricingRule $rule, int $productId ) {
if ( has_term( 'clearance', 'product_cat', $productId ) ) {
$rule->setType( 'percentage' );
$rule->setRules( [ 3 => 15, 6 => 25 ] ); // 15 % off from 3 units, 25 % from 6
$rule->logPricingModification( 'Clearance tiers applied by my-plugin' ); // shown in Debug mode
}
return $rule;
}, 40, 2 );
Other useful filters: …/price/price_by_rules (final unit price for a quantity), …/price/round_price / …/price/round_precision, …/cart/product_cart_price (price set on a cart item), …/cart/total_product_count (quantity used to pick the tier in the cart), …/cart/need_price_recalculation (skip an item), …/services/regular_pricing/price (adjusted regular/sale price for the current user), …/global_pricing/matched_pricing_rule (which global rule applies).
Write rules programmatically
| Meta key (product / variation) | Value |
|---|---|
_fixed_price_rules | array<int qty, string price> — e.g. [5 => '9.50', 10 => '8.00'] |
_percentage_price_rules | array<int qty, string percent> |
_tiered_price_rules_type | fixed | percentage |
_tiered_price_minimum_qty | int > 1 |
_tiered_pricing_maximum_quantity, _tiered_pricing_group_of_quantity | int (maximum, step) |
_tiered_price_mix_and_match_minimum | yes | no (variable parent) |
_tiered_pricing_template, _tiered_pricing_base_unit_name | layout slug; ['singular' => …, 'plural' => …] |
_{role}_fixed_price_rules, _{role}_percentage_price_rules, _{role}_tiered_price_rules_type, _{role}_tiered_price_minimum_qty, _{role}_tiered_price_pricing_type, _{role}_tiered_price_regular_price, _{role}_tiered_price_sale_price, _{role}_tiered_price_discount, _{role}_tiered_price_discount_type | role-based rules ({role} = role slug); customer rules use _user_{userId}_… |
// Product-level
update_post_meta( 123, '_fixed_price_rules', [ 5 => '9.50', 10 => '8.00' ] );
update_post_meta( 123, '_tiered_price_rules_type', 'fixed' );
\TierPricingTable\PriceManager::updateProductMinimumQuantity( 123, 5 );
// Role-based
\TierPricingTable\Addons\RoleBasedPricing\RoleBasedPricingRule::buildFromArray( 123, 'wholesale', [
'pricing_type' => 'flat', 'regular_price' => 20, 'sale_price' => 18,
'tiered_pricing_type' => 'fixed', 'fixed_tiered_pricing_rules' => [ 10 => 17, 50 => 15 ],
'minimum_order_quantity' => 5,
] )->save();
// Global rule (post type tpt-global-rule)
use TierPricingTable\Addons\GlobalTieredPricing\CPT\GlobalTieredPricingCPT;
use TierPricingTable\Addons\GlobalTieredPricing\GlobalPricingRule;
$ruleId = wp_insert_post( [ 'post_type' => GlobalTieredPricingCPT::SLUG, 'post_status' => 'publish', 'post_title' => 'Wholesale tiers' ] );
$rule = GlobalPricingRule::fromArray( [ 'tiered_pricing_type' => 'fixed', 'fixed_rules' => [ 10 => 9.5, 50 => 8 ], 'minimum' => 5, 'applying_type' => 'individual' ] );
$rule->setId( $ruleId );
$rule->setIncludedProductCategories( [ 15 ] );
$rule->setIncludedUsersRole( [ 'wholesale' ] );
$rule->save();
\TierPricingTable\Core\ServiceContainer::getInstance()->getCache()->purge();
Templates
Render the table yourself
ob_start();
\TierPricingTable\PricingTable::getInstance()->renderPricingTable( $product_id, null, [ 'display' => true, 'display_type' => 'blocks', 'title' => 'Volume pricing' ] );
$html = ob_get_clean();
Settings keys you can pass: display_type (table, blocks, options, dropdown, horizontal-table, plain-text, tooltip), title, quantity_column_title, price_column_title, discount_column_title, quantity_type (range \| static), show_discount_column, clickable_rows, active_tier_color, table_style, blocks_style, options_style, compact_layout, options_show_total, options_show_original_product_price, options_show_default_option, options_option_text, plain_text_option_text, update_price_on_product_page, show_total_price, quantity_measurement_singular, quantity_measurement_plural. The same keys work as shortcode attributes. Use tiered_pricing_table/should_render_pricing_table to suppress the automatic output and tiered_pricing_table/display_settings to change settings on the fly.
Override templates from a theme
Copy any file from the plugin’s views/frontend/ folder (tiered-pricing-table.php, tiered-pricing-blocks-style-3.php, summary-table.php, …) to **wp-content/themes/{your-theme}/tiered-pricing-table/** and edit it there. tiered_pricing_table/template/location lets a plugin redirect a template.

Variables in layout templates: $pricing_rule (PricingRule), $price_rules, $pricing_type, $minimum, $product, $product_id, $settings, $id.
Keep the markup contract
The JavaScript reads the markup: keep the root element’s id, data-product-id, data-price-rules, data-minimum, data-regular-price, data-sale-price, data-price, data-product-price-suffix, one element per tier with data-tiered-quantity / data-tiered-price / data-tiered-price-exclude-taxes / data-tiered-price-include-taxes, the base row with data-tiered-quantity="{minimum}" and class tiered-pricing--active, and the helper functions tptParseOptionText() / tptParsePlainText().
Inject content into layouts
// Extra column in the table layouts
add_action( 'tiered_pricing_table/tiered_pricing/header_columns', fn() => print '<th>Total</th>' );
add_action( 'tiered_pricing_table/tiered_pricing/row_columns', function ( \TierPricingTable\PricingRule $rule, $qty ) {
$qty = $qty ?: max( 1, (int) $rule->getMinimum() ); // null = base row
$price = $rule->getTierPrice( $qty );
echo '<td>' . ( $price ? wc_price( $price * $qty ) : '—' ) . '</td>';
}, 10, 2 );
// Badge next to a tier in every layout
foreach ( [ 'table', 'horizontal-table', 'blocks', 'options', 'dropdown', 'plain-text' ] as $layout ) {
add_action( "tiered_pricing_table/{$layout}/label", function ( $rule, $qty ) {
if ( 50 === (int) $qty ) { echo '<span class="my-badge">Best value</span>'; }
}, 10, 2 );
}
// "100 or more" instead of "100+"
add_filter( 'tiered_pricing_table/tiered_pricing/last_tier_postfix', fn() => ' or more' );
All layout hooks are listed under Template hooks.
JavaScript
The frontend engine (tiered-pricing-table-front-js, jQuery) exposes document.__tieredPricing:
// Point the plugin at a custom quantity input / price container
document.__tieredPricing = document.__tieredPricing || { overrides: {} };
document.__tieredPricing.overrides.$getQuantityField = ( parentId ) => jQuery( '#my-qty-' + parentId );
document.__tieredPricing.overrides.$getPriceContainer = ( productId, parentId ) => jQuery( '#my-price-' + parentId );
// React to quantity changes
jQuery( document ).on( 'tiered_price_update', '.tpt__tiered-pricing', function ( event, data ) {
// data.quantity, data.price, data.price_excl_tax, data.productId, data.parentId,
// data.pricing = { price, price_excl_tax, price_incl_tax, priceHtml, tieredQuantity, eventQuantity }
} );
// Set the quantity
jQuery( '.quantity-input-product-123' ).val( 10 ).trigger( 'change' );
// Initialise tables inserted after page load (quick view, AJAX)
document.querySelectorAll( '.tpt__tiered-pricing' ).forEach( function ( el ) {
if ( ! el.__tptInit ) { el.__tptInit = true; document.__tieredPricing.initFunction( el ); }
} );
The live product price is WooCommerce’s price HTML wrapped in <span class="tiered-pricing-dynamic-price-wrapper" data-price-type="dynamic|static|no-rules">; return static from tiered_pricing_table/frontend/default_price_behaviour_type to keep WooCommerce’s price, or false from …/frontend/wrap_price to skip the wrapper. Styling hooks: .tpt__tiered-pricing, .tiered-pricing--active, .tiered-pricing-table, .tiered-pricing-block, .tiered-pricing-option, .tiered-pricing-dropdown, .tier-pricing-summary-table, .tiered-pricing-you-save, .tiered-pricing-tier-label.
Shortcodes, block & widget
| Integration point | Details |
|---|---|
[tiered-pricing-table] | product_id (current post by default) plus any settings key from Render the table yourself — e.g. [tiered-pricing-table product_id="123" display_type="blocks" title="Volume pricing"] |
[tiered_price_you_save] | product_id, color, template, consider_sale_price |
Block tiered-pricing-table/tiered-pricing-block | displayType, title, activeTierColor, showDiscountColumn, column titles |
Elementor widget tiered-pricing-table | product_id, display_type, title, active_tier_color, column titles, options/measurement settings |
REST API
The WooCommerce product and variation endpoints (/wp-json/wc/v3/products/{id}, /products/{id}/variations/{vid}) read and write these fields:
| Field | Value |
|---|---|
tiered_pricing_type | fixed | percentage |
tiered_pricing_fixed_rules, tiered_pricing_percentage_rules | { "<qty>": <price|percent> } |
tiered_pricing_minimum_quantity | integer or null |
tiered_pricing_roles_data | { "<role>": { pricing_type, regular_price, sale_price, discount, discount_type, tiered_pricing_type, fixed_rules, percentage_rules, minimum, tax_status, tax_class } } — writing replaces all role data; send tiers and minimum as fixed_tiered_pricing_rules, percentage_tiered_pricing_rules, minimum_order_quantity |
tiered_pricing_product_settings | { "layout": "default"|<layout>, "base_unit_name": { "singular", "plural" }, "default_variation": <id> } |
PUT /wp-json/wc/v3/products/123
{
"tiered_pricing_type": "percentage",
"tiered_pricing_percentage_rules": { "10": 5, "50": 12.5 },
"tiered_pricing_minimum_quantity": 5,
"tiered_pricing_roles_data": { "wholesale": { "pricing_type": "percentage", "discount": 15, "tiered_pricing_type": "fixed", "fixed_tiered_pricing_rules": { "10": 7.5 }, "minimum_order_quantity": 4 } }
}
Add your own field by extending TierPricingTable\Services\API\ProductFields\ProductField and appending the class with tiered_pricing_table/api/product_fields. Plugin routes: tier-pricing-table/v1/quote-request (POST, public), /quote-forms, /quote-settings, /tax-settings, tier-pricing-table/features/tier-labels/v1/labels, …/custom-columns/v1/columns, …/tools/v1/*. WooCommerce CSV import/export columns: tiered_price_fixed, tiered_price_percentage (qty:value,…), tiered_price_type, tiered_price_minimum and per-role {role}_tiered_price_*.
Extending the admin
// A setting in the General tab (option tier_pricing_table_my_hide_for_guests, 'yes' | 'no')
add_filter( 'tiered_pricing_table/settings/general_settings', function ( array $fields ) {
$fields[] = [
'title' => 'Hide table for guests',
'id' => \TierPricingTable\Settings\Settings::SETTINGS_PREFIX . 'my_hide_for_guests',
'type' => \TierPricingTable\Settings\CustomOptions\TPTSwitchOption::FIELD_TYPE,
'default' => 'no',
];
return $fields;
} );
// An integration with its own on/off toggle under Settings → Integrations (boot-time filter)
class My_Integration extends \TierPricingTable\Integrations\Plugins\PluginIntegrationAbstract {
public function getTitle(): string { return 'My Plugin'; }
public function getDescription(): string { return 'Adds option costs to tiered prices.'; }
public function getSlug(): string { return 'my-plugin'; }
public function run() { add_filter( 'tiered_pricing_table/cart/product_cart_price', [ $this, 'addOptionsCost' ], 20, 2 ); }
}
add_filter( 'tiered_pricing_table/integrations/plugins', fn( array $list ) => array_merge( $list, [ My_Integration::class ] ) );
- Settings tabs and fields:
tiered_pricing_table/settings/sections,…/general_settings,…/general_subsections,…/calculation_logic,…/advanced_settings. Field types:tpt_switch_option,tpt_display_type,tpt_text_template,tpt_link_button. - Product editor: render fields on
tiered_pricing_table/admin/pricing_tab_begin|after_minimum_order_quantity_field|advance_product_options|pricing_tab_end($postId) and inside the rules form (…/admin/tiered_pricing_rules_form/form_begin|inputs|form_end); save onwoocommerce_process_product_meta/woocommerce_save_product_variation. Name fields withTierPricingTable\Forms\Form::getFieldName( $base, $role, $loop ). - Role / customer rules: render on
…/admin/role_based_rules/after_tiered_pricing_rules_field(anduser_based_rules), save on…/role_based_rules/save_role_based_rules(anduser_based_rules/save_user_based_rules). - Global rules: add a tab with
tiered_pricing_table/global_pricing/form_tabs(extendCPT\Form\FormTab), save in…/global_pricing/before_updating, read your meta in…/global_pricing/after_built_rule, add list columns with…/global_pricing/columns. - Custom table columns: extend
Addons\CustomColumns\Columns\AbstractCustomColumnand register it withtiered_pricing_table/custom_columns/available_columns_types+…/custom_columns/columns_handlers. - Addons: extend
Addons\AbstractAddonand add it withtiered_pricing_table/addons/list(boot-time filter); it gets a toggle on the Modules tab.
Debugging
- Debug mode (Settings → Modules → Debug) prints the resolved rule under each cart item and inside the pricing table, including the log written with
PricingRule::logPricingModification(). - Cache: catalog price HTML is cached in the
tpt_product_datatransient — purge from Settings → Modules → Cache or withServiceContainer::getInstance()->getCache()->purge(). $GLOBALS['tpt_current_user_id']makes every price calculation run for that user (manual orders use it).
Hooks reference
Every filter and action fired by the plugin, grouped by topic. Type is F (filter — return the first parameter) or A (action). Parameters are listed in order; the first parameter of a filter is the value to return. Every row is deep-linkable (the row id is hook- + the hook name with non-alphanumerics replaced by -). All names are prefixed with tiered_pricing_table/ unless shown in full.
Bootstrap & services
| Hook | Type | Parameters | Description |
|---|---|---|---|
tpt_fs_loaded | A | — | Freemius SDK initialised (tpt_fs() available). |
tiered_pricing_table/ | F | string $className | Class name instantiated by ServiceContainer::initService() — return a subclass to replace a service. |
tiered_pricing_table/ | F | array<string,AbstractAddon> $addons | Addon instances keyed by class, before run() — add, remove or replace addons. |
tiered_pricing_table/ | F | string[] $types | Default simple, variation, subscription, subscription-variation. |
tiered_pricing_table/ | F | string[] $types | Default variable, variable-subscription. |
tiered_pricing_table/ | F | string[] $types | Default variation, subscription-variation. |
tiered_pricing_table/ | F | array<string,string> $layouts | Layout slug ⇒ label (table, blocks, options, dropdown, horizontal-table, plain-text, tooltip). |
tiered_pricing_table/ | F | WP_User $user | The user prices are calculated for (default: current user, or $GLOBALS['tpt_current_user_id']). |
tiered_pricing_table/ | F | string[] $roles, int $userId | Roles used for role-based pricing and cache keys. |
tiered_pricing_table/ | F | string $separator | Separator for qty:price lists in CSV import/export (default ,). |
tiered_pricing_table/ | F | string $absolutePath, string $template | Final path of any template (frontend/…, admin/…, addons/…). |
tiered_pricing_table/ | A | string $absolutePath, array $variables | Before a template is included. |
tiered_pricing_table/ | A | string $absolutePath, array $variables | After a template is included. |
tiered_pricing_table/ | F | string $url, string $file | URL of a plugin JS asset. |
tiered_pricing_table/ | F | string $url, string $file | URL of a plugin CSS asset. |
Price calculation
| Hook | Type | Parameters | Description |
|---|---|---|---|
tiered_pricing_table/ | F | PricingRule $rule, int $productId | Main extension point. The effective rule for a product after product-level meta was read; providers (category 10, role 20, customer 25, global 30, quote 99) modify it here. Cached per request. |
tiered_pricing_table/ | F | array $rules, int $productId, string $type | Product-level rules read from meta (view context only). |
tiered_pricing_table/ | F | float|false $price, int $quantity, int $productId, string $context, string $place, PricingRule $rule | Final unit price for a quantity (false = no tier matched). |
tiered_pricing_table/ | F | bool $round | Whether to round tier prices (default: Round price option). |
tiered_pricing_table/ | F | int $decimals | Rounding precision (default max(2, wc_get_price_decimals())). |
tiered_pricing_table/ | F | string $type, int $productId | Product-level pricing type (fixed | percentage). |
tiered_pricing_table/ | F | ?int $minimum, int $productId | Product-level minimum order quantity. |
tiered_pricing_table/ | F | bool $enabled | Return true to activate RegularPricingService (WC price filters). Global/role/customer addons do this. |
tiered_pricing_table/ | F | ?float $newPrice, ?WC_Product $product, ?string $specific ('regular'|'sale'|null), $originalPrice | Adjusted regular/sale/current price for the current user (null keeps WooCommerce’s value). |
tiered_pricing_table/ | F | bool $override | Whether zero-priced products get their price overridden (default true). |
tiered_pricing_table/ | F | ?int $value, int $productId, string|false $role | Maximum quantity for a product; role-specific values are applied here. |
tiered_pricing_table/ | F | ?int $value, int $productId, string|false $role | Quantity step for a product. |
tiered_pricing_table/ | F | bool $skip, int $productId, WC_Product $product | Skip legacy category-level rules for a product. |
tiered_pricing_table/ | F | bool $check, WC_Product $product | Return true to make productHasPricingRules() scan variations instead of assuming a variable product has rules. |
Cart & checkout
| Hook | Type | Parameters | Description |
|---|---|---|---|
tiered_pricing_table/ | F | bool $recalculate, array $cartItem, WC_Cart $cart | Return false to leave an item’s price to WooCommerce (coupons addon uses this at 999). |
tiered_pricing_table/ | F | float|false $price, array $cartItem, string $cartItemKey, int $totalQuantity | Unit price set on the cart item. |
tiered_pricing_table/ | F | int $count, array $cartItem | Quantity used to pick the tier for an item (sum of variations when Summarize variations is on; global cross rules sum matched items). |
tiered_pricing_table/ | F | bool $recalculate, array $cartItem | Same as above, for the displayed item price. |
tiered_pricing_table/ | F | float|false $price, array $cartItem | Displayed unit price. |
tiered_pricing_table/ | F | float $oldPrice, array $cartItem | Crossed-out price shown next to the discounted price. |
tiered_pricing_table/ | F | bool $consider, array $cartItem | Show the sale price as a discount in the cart item price. |
tiered_pricing_table/ | F | bool $recalculate, array $cartItem, string $key, string $subtotalHtml | Whether the subtotal cell is rewritten as old/new. |
tiered_pricing_table/ | F | bool $consider, array $cartItem, string $key | Same for the subtotal (default: option). |
tiered_pricing_table/ | F | bool $control, WC_Product $product | Let the minimum-quantity addon set min on the cart quantity field. |
tiered_pricing_table/ | F | int $quantity, int $productId | Quantity compared against the minimum. |
tiered_pricing_table/ | F | bool $modify, WC_Order_Item_Product $item | Skip an item when recalculating a manual order with tiered pricing. |
Product page, dynamic price & catalog
| Hook | Type | Parameters | Description |
|---|---|---|---|
tiered_pricing_table/ | F | bool $render, int $parentProductId, ?int $variationId, array $settings | Return false to suppress the whole widget. |
tiered_pricing_table/ | F | array $settings, int $productId | Final render settings (product id is the variation when resolved). |
tiered_pricing_table/ | F | int $threshold | Variations above this count load via AJAX instead of being pre-rendered (default 10). |
tiered_pricing_table/ | A | WC_Product $parentProduct, ?int $variationId, array $settings | Before the wrapper. |
tiered_pricing_table/ | A | PricingRule $rule, WC_Product $product, array $settings | Before a layout template is included (also for each pre-rendered/AJAX variation). Debug mode prints here. |
tiered_pricing_table/ | F | ?WC_Product_Variation $variation, int $productId | Variation shown by default for a variable product. |
tiered_pricing_table/ | F | bool $wrap, WC_Product $product, string $priceHtml | Wrap the price HTML in the dynamic-price span. |
tiered_pricing_table/ | F | bool $wrap, WC_Product $product | Same for variable products. |
tiered_pricing_table/ | F | string $type ('dynamic'), WC_Product $product, string $priceHtml, string $context | dynamic (JS rewrites the price), static (leave it), no-rules. $context is product-page or shop-loop. |
tiered_pricing_table/ | F | bool $modify, string $suffix, WC_Product $product, $price, $qty | Wrap {price_including_tax} / {price_excluding_tax} in spans the JS can update. |
tiered_pricing_table/ | F | array $settings, int $variationId, string $displayContext | Settings for variation tables loaded over AJAX. |
tiered_pricing_table/ | F | bool $verify, string $nonce, string $action | Enable nonce verification on the get_pricing_table AJAX endpoint (default false). |
tiered_pricing_table/ | F | string $newHtml, string $defaultHtml, WC_Product $product | Catalog price HTML (lowest / range / custom). |
tiered_pricing_table/ | F | bool $format, string $defaultHtml, WC_Product $variation | Also format variation prices in the catalog (default false). |
tiered_pricing_table/ | F | array $variables | Placeholders offered in text-template settings (tp_quantity, tp_discount, tp_rounded_discount, tp_price, tp_base_unit_name, tp_required_quantity, tp_next_price, tp_next_discount, tp_actual_discount, tp_ys_price, tp_ys_total_price, tp_ys_percentage_discount). |
Template hooks
Fired inside the layout templates in views/frontend/. $args for label actions is ['id' => $id, 'style' => '<style>']; $qty is null for the base (minimum) row in row_columns.
| Hook | Type | Parameters | Description |
|---|---|---|---|
tiered_pricing_table/ | A | PricingRule $rule | Before the table (table styles, horizontal table). |
tiered_pricing_table/ | A | PricingRule $rule | Echo extra <th> header cells (table styles, horizontal table). |
tiered_pricing_table/ | A | PricingRule $rule, ?int $qty | Echo extra <td> cells per row. |
tiered_pricing_table/ | A | PricingRule $rule, array $settings, string $templateName | Extra rows at the end of <tbody>. |
tiered_pricing_table/ | A | PricingRule $rule, array $settings, string $templateName | Table footer. |
tiered_pricing_table/ | A | PricingRule $rule, int $productId | After the table (horizontal table passes only $rule). |
tiered_pricing_table/ | F | string $postfix ('+'), int $qty, PricingRule $rule, string $layout ('table'|'blocks') | Suffix of the last tier quantity (e.g. 100+). |
tiered_pricing_table/ | A | PricingRule $rule, int $qty, array $args | Badge next to a quantity in table layouts. |
tiered_pricing_table/ | A | PricingRule $rule, int $qty, array $args | Badge in the horizontal table. |
tiered_pricing_table/ | A | PricingRule $rule, int $qty, array $args | Badge in blocks layouts. |
tiered_pricing_table/ | A | PricingRule $rule, int $qty, array $args | Badge in options layouts. |
tiered_pricing_table/ | A | PricingRule $rule, int $qty, array $args | Badge in the dropdown. |
tiered_pricing_table/ | A | PricingRule $rule, int $qty, array $args | Badge in plain text lines. |
tiered_pricing_table/ | A | PricingRule $rule, array $settings | Extra columns in the horizontal grid. |
tiered_pricing_table/ | A | PricingRule $rule, array $settings | Extra blocks inside .tiered-pricing-blocks. |
tiered_pricing_table/ | A | PricingRule $rule | After the blocks container. |
tiered_pricing_table/ | A | PricingRule $rule, array $settings | Extra options. |
tiered_pricing_table/ | A | PricingRule $rule | After the options. |
tiered_pricing_table/ | A | PricingRule $rule | Extra <li> options. |
tiered_pricing_table/ | A | PricingRule $rule | After the dropdown list. |
tiered_pricing_table/ | A | PricingRule $rule, array $settings | Extra lines. |
tiered_pricing_table/ | A | PricingRule $rule, array $settings | After the list. |
tiered_pricing_table/ | A | string $totalLabel, string $eachLabel | Around the totals summary (table & detailed). |
tiered_pricing_table/ | A | string $totalLabel, string $eachLabel | Before the inline summary. |
tiered_pricing_table/ | A | string $totalLabel, string $eachLabel | After the inline summary. |
Tier labels & custom columns
| Hook | Type | Parameters | Description |
|---|---|---|---|
tiered_pricing_table/ | F | string $html, TierLabel $label | Rendered label markup. |
tiered_pricing_table/ | F | array<string,string> $types | Register a column type (type ⇒ label). |
tiered_pricing_table/ | F | array $types | price, number, text. |
tiered_pricing_table/ | F | array<string,string> $handlers | Column type ⇒ handler class (extends AbstractCustomColumn). |
tiered_pricing_table/ | F | bool $visible, AbstractCustomColumn $column | Hide/show a column. |
tiered_pricing_table/ | F | string $name, AbstractCustomColumn $column | Column header text. |
tiered_pricing_table/ | F | mixed $value, PricingRule $rule, ?int $qty, AbstractCustomColumn $column | Cell value. |
Global pricing rules
| Hook | Type | Parameters | Description |
|---|---|---|---|
tiered_pricing_table/ | F | ?GlobalPricingRule $rule, WC_Product $product, WP_User $user | The rule chosen for a product/user — implement custom arbitration here. |
tiered_pricing_table/ | F | bool $matched, GlobalPricingRule $rule, WP_User $user, WC_Product $product | Result of a rule’s matching logic. |
tiered_pricing_table/ | F | GlobalPricingRule $rule | Rule built from post meta — read your own meta into $rule->data. |
tiered_pricing_table/ | F | bool $valid, GlobalPricingRule $rule | Whether a rule is considered valid (has pricing). |
tiered_pricing_table/ | F | PricingRule $rule, GlobalPricingRule $globalRule, int $productId, string $priority | Before a matched rule is applied ($priority: flexible | prefer-product | override). |
tiered_pricing_table/ | F | PricingRule $rule, GlobalPricingRule $globalRule, int $productId, string $priority | After it was applied. |
tiered_pricing_table/ | F | FormTab[] $tabs, Form $form | Tabs of the rule editor. |
tiered_pricing_table/ | A | FormTab $tab, GlobalPricingRule $rule | End of each tab. |
tiered_pricing_table/ | A | int $ruleId, GlobalPricingRule $rule | Quantity tab, after the minimum field. |
tiered_pricing_table/ | A | GlobalPricingRule $rule, int $ruleId | On save, before $rule->save() — persist custom fields. |
tiered_pricing_table/ | F | array $columns | List-table columns (objects with getName()/render()). |
tiered_pricing_table/ | A | string $column, GlobalPricingRule $rule | After a list-table cell is rendered. |
Role-based pricing
| Hook | Type | Parameters | Description |
|---|---|---|---|
tiered_pricing_table/ | F | string[] $metaSuffixes, string $role | Meta suffixes whose existence means “role has rules” (default _tiered_price_rules_type, _tiered_price_pricing_type). |
tiered_pricing_table/ | F | array $rules, int $productId, string $type | Role tier rules read from meta. |
tiered_pricing_table/ | F | string $type, string $role, int $productId | fixed | percentage. |
tiered_pricing_table/ | F | ?int $minimum, string $role, int $productId | Role minimum quantity. |
tiered_pricing_table/ | F | ?float $price, string $role, int $productId | Role regular price. |
tiered_pricing_table/ | F | ?float $price, string $role, int $productId | Role sale price. |
tiered_pricing_table/ | F | ?float $discount, string $role, int $productId | Role percentage discount. |
tiered_pricing_table/ | F | string $type, string $role, int $productId | sale_price | regular_price. |
tiered_pricing_table/ | F | string $type, string $role, int $productId | flat | percentage. |
tiered_pricing_table/ | F | string $status, string $role, int $productId | Role tax status override. |
tiered_pricing_table/ | F | string $class, string $role, int $productId | Role tax class override. |
tiered_pricing_table/ | A | int $productId, string $role | After a role’s rules were deleted from a product. |
tiered_pricing_table/ | A | int $productId, array $postData, string $role, ?int $loop | After a role’s rules were saved from the product editor. |
tiered_pricing_table/ | A | PricingRule $rule, RoleBasedPricingRule $roleRule, int $productId | After the role rule was applied to the product’s PricingRule. |
tiered_pricing_table/ | F | RoleBasedPricingRule $rule | Rule built from meta. |
tiered_pricing_table/ | F | RoleBasedPricingRule $rule, string $role, array $data | Rule built from an array (import). |
tiered_pricing_table/ | F | string[] $roles | Roles excluded from CSV import/export (default editor, author, contributor, shop_manager). |
Customer-based pricing
| Hook | Type | Parameters | Description |
|---|---|---|---|
tiered_pricing_table/ | F | string[] $metaSuffixes, int $userId | Same as the role equivalent. |
tiered_pricing_table/ | F | array $rules, int $productId, string $type | Customer tier rules. |
tiered_pricing_table/ | F | string $type, int $userId, int $productId | fixed | percentage. |
tiered_pricing_table/ | F | ?int $minimum, int $userId, int $productId | Customer minimum. |
tiered_pricing_table/ | F | ?float $price, int $userId, int $productId | Customer regular price. |
tiered_pricing_table/ | F | ?float $price, int $userId, int $productId | Customer sale price. |
tiered_pricing_table/ | F | ?float $discount, int $userId, int $productId | Customer discount. |
tiered_pricing_table/ | F | string $type, int $userId, int $productId | sale_price | regular_price. |
tiered_pricing_table/ | F | string $type, int $userId, int $productId | flat | percentage. |
tiered_pricing_table/ | F | string $status, int $userId, int $productId | Tax status override. |
tiered_pricing_table/ | F | string $class, int $userId, int $productId | Tax class override. |
tiered_pricing_table/ | A | int $productId, int $userId | After a customer’s rules were deleted. |
tiered_pricing_table/ | A | int $productId, array $postData, int $userId, ?int $loop | After a customer’s rules were saved. |
tiered_pricing_table/ | A | PricingRule $rule, UserBasedPricingRule $userRule, int $productId | After the customer rule was applied. |
tiered_pricing_table/ | F | UserBasedPricingRule $rule | Rule built from meta. |
tiered_pricing_table/ | F | UserBasedPricingRule $rule, int $userId, array $data | Rule built from an array. |
Admin product editor
| Hook | Type | Parameters | Description |
|---|---|---|---|
tiered_pricing_table/ | A | int $postId | Top of the Tiered Pricing tab. |
tiered_pricing_table/ | A | int $productId, ?int $loop | After the minimum field (product tab and each variation). |
tiered_pricing_table/ | A | int $postId | Before the Additional options group. |
tiered_pricing_table/ | A | int $postId | Inside Additional options. |
tiered_pricing_table/ | A | int $postId | Bottom of the tab. |
tiered_pricing_table/ | F | bool $active | Show the Role & Customer Pricing tab. |
tiered_pricing_table/ | A | int $postId | Top of that tab. |
tiered_pricing_table/ | A | int $postId | Tab content (role block 99, customer block 100). |
tiered_pricing_table/ | A | int $postId | Bottom of that tab. |
tiered_pricing_table/ | A | $entityId, ?string $role, ?int $loop, string $customPrefix | Start of the rules form component. |
tiered_pricing_table/ | A | $entityId, ?string $role, ?int $loop, string $customPrefix | After the fixed/percentage selector. |
tiered_pricing_table/ | A | $entityId, $amount, ?string $role, ?int $loop, string $customPrefix, string $type | Inside each tier row. |
tiered_pricing_table/ | A | $entityId, ?string $role, ?int $loop, string $customPrefix | End of the component. |
tiered_pricing_table/ | F | int $percent | Width of the quantity/price inputs (default 50). |
tiered_pricing_table/ | A | $entityId, ?string $role, ?int $loop, string $customPrefix, array $data, array $request | After the rules form was parsed from $_POST. |
tiered_pricing_table/ | A | int $productId, string $role, ?int $loop | Inside a role’s pricing form. |
tiered_pricing_table/ | A | int $productId, string $role, ?int $loop | Inside a role’s pricing form (tax selects render here). |
tiered_pricing_table/ | A | int $productId, int $userId, ?int $loop | Inside a customer’s pricing form. |
tiered_pricing_table/ | A | int $productId, int $userId, ?int $loop | Inside a customer’s pricing form. |
tiered_pricing_table/ | F | ?Tip $tip, string $slug | Resolve a custom admin tip. |
REST API, import & export
| Hook | Type | Parameters | Description |
|---|---|---|---|
tiered_pricing_table/ | F | string[] $fieldClasses | Classes (extending ProductField) registered as WooCommerce REST product fields. |
tiered_pricing_table/ | F | string[] $objectTypes, ProductField $field | REST object types the field is added to (default product, product_variation). |
tiered_pricing_table/ | F | array $columns | Columns offered in the WooCommerce CSV importer mapping screen. |
tiered_pricing_table/ | F | array $headerToKey | Auto-mapping of CSV headers to columns. |
tiered_pricing_table/ | A | int $quoteRequestId | A quote request was saved (emails hook here). |
Integrations
| Hook | Type | Parameters | Description |
|---|---|---|---|
tiered_pricing_table/ | F | string[] $classes | Plugin integration classes (boot-time — see note above). |
tiered_pricing_table/ | F | array<string,string> $needleToClass | Theme integrations keyed by a lower-case needle matched against the theme name/template (boot-time). |
tiered_pricing_table/ | F | bool $supported, WC_Product $product | Whether SEO schema enhancement runs for variable products; {slug} is yoast_seo, rank_math or seopress. |
Settings
| Hook | Type | Parameters | Description |
|---|---|---|---|
tiered_pricing_table/ | F | SectionAbstract[] $sections | Settings tabs. |
tiered_pricing_table/ | F | array $fields | Fields of the General tab (after subsections were merged). |
tiered_pricing_table/ | F | string[] $subsectionClasses | Subsections of the General tab. |
tiered_pricing_table/ | F | array $fields | Fields of the Calculations tab. |
tiered_pricing_table/ | F | array $fields | Fields of the Modules tab (addon flags). |
tiered_pricing_table/ | F | array $rows | Integration toggle rows. |
tiered_pricing_table/ | F | array<string,array> $categories | Integration groups (id => ['title','description']). |
tiered_pricing_table/ | A | — | After the column-title inputs. |
tiered_pricing_table/ | A | — | End of the column-titles field (custom columns UI mounts here). |
Resources
- User Guide — store-owner documentation for every feature.
- Guides — how-to articles.
- Contact us — missing hook or integration question? Let us know.