Developer hooks
Actions and filters to change PriceKit's price display, placement, cart prices and currency conversion, plus the order meta it stores.
Updated November 7, 2026 · 1 min read
PriceKit's classes are prefixed MDP_. Hooks are stable across minor versions.
Filters
| Filter | Arguments | Use |
|---|---|---|
mdp_price_display_context |
$context, $product |
Force card, compact or grid for a price |
mdp_auto_placement |
$enabled |
Turn automatic placement on or off in code |
mdp_placement_hooks |
$hooks, $key |
Change the hooks (hook => priority) an element is placed on |
mdp_cart_item_price |
$price, $cart_item, $price_before |
Final say over a cart line's price |
mdp_price_to_display_currency |
$converted, $base |
Currency conversion for an unsupported currency switcher |
mdp_compat_notices |
$notices |
Add lines to the compatibility list in Settings → Advanced |
Actions
| Action | Arguments | When |
|---|---|---|
mdp_user_tier_changed |
$user_id, $tier_id |
A tier is assigned or removed ($tier_id 0 = removed) |
Example: no member price for one category in the cart
add_filter( 'mdp_cart_item_price', function ( $price, $item, $before ) {
if ( has_term( 'gift-cards', 'product_cat', $item['product_id'] ) ) {
return $before;
}
return $price;
}, 10, 3 );
Order item meta
| Meta | Value |
|---|---|
_mdp_price_before |
unit price before PriceKit |
_mdp_price_after |
member or bundle unit price |
_mdp_discount_source |
member or bundle |
_mdp_discount_name |
the discount name at the time of the order |
Product meta
_mdp_member_price, _mdp_member_price_from, _mdp_member_price_to, _mdp_exclude_discount, _mdp_force_discount.