Discount Rules for WooCommerce 1.4.31 has 5 actions and 27 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 Rules for WooCommerce fires an action
add_action( 'disco_initialize_failed', function( $err ) {
// Your code runs here.
}, 10, 1 );
// Change a value Discount Rules for WooCommerce is about to use
add_filter( 'disco_final_discounted_amount', function( $value, $arg2 ) {
// Change $value here.
return $value;
}, 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.
Changes by version
1.4.30 → 1.4.31 · Nov 19, 2026 · 0 added, 0 removed
No hooks were added or removed in this release.
All hooks
-
/** * Normalize each campaign's amount before the amounts compete. */ apply_filters( 'disco_final_discounted_amount', (float) $discount, $this->campaign_discount_type( $intent->campaign ) ); -
/** * Tracking interval */ apply_filters( "{$this->client->getSlug()}_tracking_interval", '-1 week' ); -
/** * After request to api server. */ do_action( "{$this->getSlug()}_after_request", $response, $route ); -
/** * After request to api server to route. */ do_action( "{$this->getSlug()}_after_request_{$route}", $response, $route ); -
/** * before request to api server. */ do_action( "{$this->getSlug()}_before_request", $params, $route, $headers, $this->clientVersion, $url ); -
/** * before request to api server to route. */ do_action( "{$this->getSlug()}_before_request_{$route}", $params, $route, $headers, $url ); -
/** * Request Blocking mode. Set it to true for debugging the response with after * request action. */ apply_filters( "{$this->getSlug()}_request_blocking_mode", $blocking ); -
/** * Filter Request Route string */ apply_filters( "{$this->slug}_request_route", $route ); -
/** * API EndPoint */ apply_filters( "{$this->slug}_WebAppick_API_EndPoint", $this->API_EndPoint, $this->apiVersion, $this->clientVersion ); -
/** * Filter Final API URL for request */ apply_filters( "{$this->slug}_WebAppick_API_URL", $URL, $this->API_EndPoint, $route, $this->apiVersion, $this->clientVersion ); -
/** * Filter the cache lifetime, in seconds, of campaign usage counts. */ apply_filters( 'disco_campaign_usage_cache_ttl', self::CACHE_TTL, $campaign_id ); -
/** * Add defaults without changing the core values. */ apply_filters( 'disco_settings', $default ); -
/** * This filter is documented in wp-includes/rest-api/class-wp-rest-server.php */ apply_filters( 'rest_pre_echo_response', $data, $server, $request ); -
/** * Support Page URL */ apply_filters( "WebAppick_{$projectSlug}_Support_Page_URL", false ); -
/** * Set Support Ticket Ajax Error Response. */ apply_filters( "WebAppick_{$projectSlug}_Support_Request_Ajax_Error_Response", false, $_REQUEST ); -
/** * Set Ajax Success Response for Support Ticket Submission */ apply_filters( "WebAppick_{$projectSlug}_Support_Request_Ajax_Success_Response", false, $_REQUEST ); -
/** * Set Support Ticket Template For sending the email query. */ apply_filters( "WebAppick_{$projectSlug}_Support_Ticket_Email_Template", false ); -
/** * Set Ticket Recipient Email */ apply_filters( "WebAppick_{$projectSlug}_Support_Ticket_Recipient_Email", false ); -
apply_filters( 'disco_convert_price', $this->resolve_subtotal( false ) ); -
apply_filters( "{$this->client->getSlug()}_extra_uninstall_reasons", [], $reasons ); -
apply_filters( "{$this->client->getSlug()}_tracker_data", $data ); -
apply_filters( "{$this->client->getSlug()}_tracking_default_notice_message", esc_html__( 'Want to help make %1$s even more awesome? Allow %1$s to collect non-sensitive diagnostic data and usage information.', 'disco' ) ); -
apply_filters( "{$this->client->getSlug()}_what_tracked", $data ); -
apply_filters( 'disco_campaign_user_limit_order_statuses', array( 'wc-processing', 'wc-on-hold', 'wc-completed', ), $campaign_id ); -
apply_filters( 'disco_classes_to_execute', $this->classes ); -
apply_filters( 'disco_d_ajax_admin_initialize', true ); -
apply_filters( 'disco_d_ajax_initialize', true ); -
apply_filters( 'disco_disable_price_cache', false ); -
apply_filters( 'disco_exclude_product_from_discount', false, $product_id, $product ); -
do_action( 'disco_initialize_failed', $err ); -
apply_filters( 'disco_woocommerce_add_extra', true ); -
apply_filters( 'WebAppick_is_local', isset( $_SERVER['REMOTE_ADDR'] ) ? in_array( $_SERVER['REMOTE_ADDR'], [ '127.0.0.1', '::1' ] ) : true );
Generated from Discount Rules for WooCommerce'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: