Discount Master 2.6.0 has 18 actions and 49 filters, read directly from its source code on Nov 19, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Run your own code when Discount Master fires an action
add_action( 'dmfwc_register_action_types', function( $arg1 ) {
// Your code runs here.
}, 10, 1 );
// Change a value Discount Master is about to use
add_filter( 'dmfwc_convert_discount', function( $discount, $rate ) {
// Change $discount here.
return $discount;
}, 10, 2 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
/** * Lets an add-on name the settings it keeps on the Settings screen. Values are * saved as text. */ apply_filters( "{DMFWC::$DMFWC_PLUGIN_SLUG}_allowed_settings", $allowed_settings ); -
/** * This filter is documented in includes/class-dmfwc-catalog-price.php */ apply_filters( "{DMFWC::$DMFWC_PLUGIN_SLUG}_discount_is_feed_safe", true, $discount ); -
/** * Filters the most variations a variable product may have for its range to get * the note. */ apply_filters( "{DMFWC::$DMFWC_PLUGIN_SLUG}_omnibus_max_variations", self::MAX_VARIATIONS, $product ); -
/** * Filters the query parameters that mark a request as a new marketing touch. */ apply_filters( "{DMFWC::$DMFWC_PLUGIN_SLUG}_attribution_campaign_params", $params ); -
/** * Filters whether the attribution capture script is loaded. */ apply_filters( "{DMFWC::$DMFWC_PLUGIN_SLUG}_attribution_is_needed", $needed ); -
/** * Filters whether the rules that block coupons refuse this coupon. */ apply_filters( "{DMFWC::$DMFWC_PLUGIN_SLUG}_block_coupon", true, $coupon, $blockers ); -
/** * Filters the message a shopper sees when a coupon is refused. */ apply_filters( "{DMFWC::$DMFWC_PLUGIN_SLUG}_blocked_coupon_message", __( 'Coupon codes cannot be combined with the discount already applied to your cart.', 'discount-master-for-woocommerce' ), $coupon, $blockers ); -
/** * Filters whether a coupon that excludes sale items also skips a line a rule * discounted. */ apply_filters( "{DMFWC::$DMFWC_PLUGIN_SLUG}_coupon_excludes_discounted_line", true, $coupon, $values ); -
/** * Filters the exchange rate from the base currency to the visitor's currency. */ apply_filters( "{DMFWC::$DMFWC_PLUGIN_SLUG}_currency_rate", $rate ); -
/** * Filters the condition types that can be evaluated during feed generation and * for the Omnibus stable price. */ apply_filters( "{DMFWC::$DMFWC_PLUGIN_SLUG}_feed_safe_condition_types", self::$feed_safe_condition_types, $discount ); -
/** * Filters whether a rule may still apply, as far as usage goes. */ apply_filters( "{DMFWC::$DMFWC_PLUGIN_SLUG}_rule_usage_available", $available, $discount ); -
/** * Fires after an order's rules are added to their usage counts. */ do_action( "{DMFWC::$DMFWC_PLUGIN_SLUG}_rule_usage_recorded", $rule_ids, $order ); -
/** * Fires after an order's rules are taken back out of their usage counts. */ do_action( "{DMFWC::$DMFWC_PLUGIN_SLUG}_rule_usage_released", $counted_ids, $order ); -
/** * Lets an add-on name the only values a choice setting may be saved with. */ apply_filters( "{DMFWC::$DMFWC_PLUGIN_SLUG}_setting_choices", [] ); -
/** * Filters the spend more message above the classic cart and checkout. */ apply_filters( "{DMFWC::$DMFWC_PLUGIN_SLUG}_spend_more_notice", $message, $offer ); -
/** * Filters a rule after its money amounts were scaled, so an add-on can scale * its own. */ apply_filters( 'dmfwc_convert_discount', $discount, $rate ); -
/** * Filters the notices shown in the Dashboard's attention panel. */ apply_filters( 'dmfwc_dashboard_notices', $notices, $stats ); -
/** * Filters the editor's errors before anything is saved. Any error stops the * save. */ apply_filters( 'dmfwc_discount_validation_errors', $errors, $form_data ); -
/** * Filters the condition types the rule tester can answer from a product alone. */ apply_filters( 'dmfwc_preview_product_conditions', [ 'products', 'product-category', 'product-tag' ] ); -
/** * Filters extra usage rows for the rule tester, shown after the usage limit. */ apply_filters( 'dmfwc_preview_usage_rows', [], $form_data, $discount_id ); -
/** * Fires after built-in action handlers are registered. */ do_action( 'dmfwc_register_action_types', self::$actions ); -
/** * Fires after built-in condition handlers are registered. */ do_action( 'dmfwc_register_condition_types', self::$conditions ); -
apply_filters( 'dmfwc_you_saved_custom_text', $label ); -
apply_filters( "{DMFWC::$DMFWC_PLUGIN_SLUG}_get_price_html", $range_html, $product ); -
apply_filters( "{DMFWC::$DMFWC_PLUGIN_SLUG}_ajax_search", $response, $posted_data ); -
apply_filters( "{DMFWC::$DMFWC_PLUGIN_SLUG}_allow_cartless_conditions", false, $active_discount ); -
apply_filters( "{DMFWC::$DMFWC_PLUGIN_SLUG}_allowed_description_html", $allowed_html ); -
apply_filters( "{DMFWC::$DMFWC_PLUGIN_SLUG}_available_variation", $args, $active_discounts ); -
apply_filters( "{DMFWC::$DMFWC_PLUGIN_SLUG}_calculate_you_saved", $dmfwc_you_saved ); -
do_action( "{DMFWC::$DMFWC_PLUGIN_SLUG}_cart_discount_applied", $discount_id, $discount, $cart ); -
apply_filters( "{DMFWC::$DMFWC_PLUGIN_SLUG}_cart_item_price", $price_html, $cart_item, $cart_item_key, $dmfwc_public ); -
apply_filters( "{DMFWC::$DMFWC_PLUGIN_SLUG}_cart_item_subtotal", $product_subtotal, $cart_item, $cart_item_key ); -
apply_filters( "{DMFWC::$DMFWC_PLUGIN_SLUG}_check_cart_discount_conditions", $passed, $active_discount ); -
apply_filters( "{DMFWC::$DMFWC_PLUGIN_SLUG}_check_extra_conditions", true, $discount ); -
apply_filters( "{DMFWC::$DMFWC_PLUGIN_SLUG}_check_product_discount_conditions", $passed, $cart_item_or_product, $active_discount ); -
apply_filters( "{DMFWC::$DMFWC_PLUGIN_SLUG}_discount_actions", $discount_actions, $form_data ); -
apply_filters( "{DMFWC::$DMFWC_PLUGIN_SLUG}_discount_actions_require_amount", $actions ); -
apply_filters( "{DMFWC::$DMFWC_PLUGIN_SLUG}_discount_conditions", $discount_conditions, $form_data ); -
apply_filters( "{DMFWC::$DMFWC_PLUGIN_SLUG}_discount_includes_on_sale", $includes, $discount ); -
apply_filters( "{DMFWC::$DMFWC_PLUGIN_SLUG}_evaluate_condition_row", null, $condition_name, $condition_values, $context, $active_discount ); -
apply_filters( "{DMFWC::$DMFWC_PLUGIN_SLUG}_omnibus_note_html", ' ' . $note, $lowest, $product, $display_ready ); -
apply_filters( "{DMFWC::$DMFWC_PLUGIN_SLUG}_populate_discount_field_meta", $returned_value, $meta_key, $meta_value, $discount_meta ); -
apply_filters( "{DMFWC::$DMFWC_PLUGIN_SLUG}_process_discount_meta", $discount, $post_id, $raw_meta ); -
do_action( "{DMFWC::$DMFWC_PLUGIN_SLUG}_product_discount_applied", $discount, $cart_item ); -
do_action( "{DMFWC::$DMFWC_PLUGIN_SLUG}_settings_tab_content_advanced" ); -
do_action( "{DMFWC::$DMFWC_PLUGIN_SLUG}_settings_tab_content_attribution" ); -
do_action( "{DMFWC::$DMFWC_PLUGIN_SLUG}_settings_tab_content_display" ); -
do_action( "{DMFWC::$DMFWC_PLUGIN_SLUG}_settings_tab_content_performance" ); -
do_action( "{DMFWC::$DMFWC_PLUGIN_SLUG}_settings_tab_content_pricing" ); -
do_action( 'dmfwc_after_fields_actions' ); -
do_action( 'dmfwc_after_fields_conditions' ); -
do_action( 'dmfwc_after_fields_spend_more' ); -
do_action( 'dmfwc_after_fields_usage_limit' ); -
apply_filters( 'dmfwc_app_wrapper_classes', [ 'dmfwc-admin-page', 'pwp-app' ] ); -
do_action( 'dmfwc_before_actions_repeater' ); -
do_action( 'dmfwc_before_fields_actions' ); -
do_action( 'dmfwc_before_fields_conditions' ); -
apply_filters( 'dmfwc_discount_action_label', $label, $discount, $scope ); -
apply_filters( 'dmfwc_discount_meta_label', $label, $discount ); -
apply_filters( 'dmfwc_discount_meta_text', $text, $discount, $scope, $quantity ); -
apply_filters( 'dmfwc_discount_table_actions', $actions, $discount_actions, $discount_meta ); -
apply_filters( 'dmfwc_render_field_args', wp_parse_args( $args, $defaults ) ); -
apply_filters( 'wc_aelia_cs_convert', $probe, $base, get_woocommerce_currency() ); -
apply_filters( 'wcml_raw_price_amount', $probe ); -
apply_filters( 'woocs_exchange_value', $probe );
Generated from Discount Master's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Done for you
Rather have it built for you?
Tell us what should change and we’ll write and test the code using these hooks.
Custom hook snippet
from $49
A small, update-safe change built on the plugin’s own hooks.
- Code written against the plugin’s actions and filters
- Tested on a staging copy of your site
- Install instructions included
Typical turnaround: 2–3 business days
Choose thisPlugin customisation
from $149
New features or changed behaviour, without editing the plugin’s files.
- Built as a companion plugin, so updates never wipe it
- Exact quote before we start
- Tested on staging, then deployed
Typical turnaround: 3–7 business days
Choose thisNot sure which fits? Describe what you need and we’ll suggest the simplest option.
Can't find the right hook?
We can build the customisation for you. Describe what you need: