These hooks control where notifications may appear (display rules) and what data populates dynamic tags (content source pools, filters, and smart targeting).
Index: Hook Reference Hub. Eligibility pipeline: Notifications and Eligibility.
Pro extends advanced rule types via Pro Integration Bridge (display rule and content source filters).
Display rules (filters)
| Hook | Parameters | Description |
|---|
notifal/onpage/display_rules/sanitized_settings | array $sanitized, array $raw_settings | Sanitized display rules before save |
notifal/onpage/display_rules/supported_types | array $rule_types | Supported rule type definitions (Pro adds categories, URL, users) |
notifal/onpage/display_rules/before_validation | array $rules, string $combination_logic, array $context | Rules before server-side validation |
notifal/onpage/display_rules/evaluation_result | `bool | null $result, array $rules, string $combination_logic, array $context` | Override rule evaluation (null = use core logic) |
Client-side display rules (filters)
Rules evaluated in JavaScript after the eligibility response.
| Hook | Parameters | Description |
|---|
notifal/onpage/client_user_rules | `array | null $clientRules, int $notificationId` | Visit history rules (new/return/first session) |
notifal/onpage/client_cart_rules | `array | null $clientRules, int $notificationId` | WooCommerce cart rules for JS evaluation |
notifal/onpage/client_page_rules | `array | null $clientRules, int $notificationId` | Page targeting rules for JS evaluation |
notifal/onpage/user_display_rules/match | bool $matches, array $rule_data, array $auth_context | Server-side login/role rule match result |
WooCommerce cart context (filters)
| Hook | Parameters | Description |
|---|
notifal/onpage/woocommerce/cart_context | array $cart, array $context | Normalized cart snapshot for rule evaluation |
notifal/onpage/content_source/cart_product_pool_ids | int[] $productIds, array $condition, array $cart | Product IDs derived from cart for pool building |
Smart targeting (filters)
| Hook | Parameters | Description |
|---|
notifal/onpage/smart_targeting_excluded_singular_post_types | string[] $postTypes | Singular post types excluded from smart targeting (default includes page) |
notifal/onpage/smart_targeting_ui_visible | bool $isVisible, array $notificationData | Whether Smart Targeting UI shows in editor (Pro may hide for page-only templates) |
Pro implements smart targeting pool resolution via notifal/onpage/content_source/resolve_pool and related filters.
Content source settings (filters)
| Hook | Parameters | Description |
|---|
notifal/onpage/content_source_settings | array $settings | Parsed content source settings |
notifal/onpage/content_source/sanitized_settings | array $sanitized, array $raw_settings | Sanitized settings before save/use |
notifal/onpage/order_filters | array $filters | Order filters before content source queries |
notifal/onpage/product_filters | array $filters | Product filters before content source queries |
notifal/onpage/user_filters | array $filters | User filters before content source queries |
Entity pools and resolution (filters)
| Hook | Parameters | Description |
|---|
notifal/onpage/content_source/entity_filters | array $filters, string $entity_type, array $settings, array $page_context | Per-entity filters before pool query |
notifal/onpage/content_source/pool_cache_key | string $cache_key, string $entity_type, array $settings, array $page_context | Extend pool cache key (e.g. smart targeting) |
notifal/onpage/content_source/resolve_pool | `array | null $pool, array $context` | Return pool array to bypass default loader, or null to defer |
$entity_type examples: product, order, post, page, comment, custom_posttype:{slug}.
Product pool caching (filters)
| Hook | Parameters | Description |
|---|
notifal/onpage/product_pool/size | int $pool_size, array $content_source_settings | Number of products fetched (default 18) |
notifal/onpage/product_pool/timeout | int $timeout, array $content_source_settings | Cache TTL in seconds (default 720) |
notifal/onpage/product_pool/sale_revalidation_interval | int $interval, array $content_source_settings | Sale re-check interval for cached pools (min 60) |
Order pool caching (filters)
| Hook | Parameters | Description |
|---|
notifal/onpage/order_pool/size | int $pool_size, array $content_source_settings | Number of orders fetched (default 18) |
notifal/onpage/order_pool/timeout | int $timeout, array $content_source_settings | Cache TTL in seconds (default 720) |
Retrigger variants (filter)
| Hook | Parameters | Description |
|---|
notifal/onpage/retrigger_variants/max | int $max | Max pre-rendered pool variants for client-side retrigger |
Cache cleared (actions)
Pool cache invalidation actions are listed under notification CRUD in Notifications and Eligibility:
notifal/onpage_notification/order_pool_cache_clearednotifal/onpage_notification/product_pool_cache_cleared
Registered by Notifal Pro when licensed. Base plugin calls these with empty defaults when Pro is inactive.
| Hook | Parameters | Description |
|---|
notifal_pro_build_comment_filters | array $filters, array $settings | Comment filter definitions for content source |
notifal_pro_fetch_comment_pool | array $pool, array $filters, array $settings | Comment pool items |
notifal_pro_get_comment_count | `int | null $count, array $settings, array $filters` | Comment count for counter tags |
notifal_pro_build_comment_based_context | array $settings, array $pageContext | Tag context for comment-based source |
notifal_pro_add_comment_context_to_post_based | array $context, ... | Add comment data to post-based context |
notifal_pro_add_comment_context_to_page_based | array $context, ... | Add comment data to page-based context |
notifal_pro_add_comment_context_to_mixed | array $context, ... | Add comment data to mixed source context |
notifal_pro_add_comment_context_to_{entityType} | dynamic | Entity-specific comment context (dynamic suffix) |
notifal_pro_get_hidden_comment_restrictions | array $detectedCategories | Hidden comment restrictions in tag category detector |
Full Pro license documentation: Pro Integration Bridge.
What to read next
Hooks series
- Hook Reference Hub
- Hooks: Lifecycle and Bootstrap
- Hooks: Notifications and Eligibility
- Hooks: Templates and Rendering
- Hooks: Tags and Dynamic Data
- Hooks: Display Rules and Content Source (you are here)
- Hooks: Analytics and Tracking
- Hooks: Admin UI Extension
- Hooks: Pro Integration Bridge