Hooks

Hook Reference Hub

5 min read

Notifal exposes WordPress actions and filters so you can extend notifications, templates, Forms, eligibility, analytics, and admin UI without editing core plugin files.

Hook names are defined as PHP constants in:

PluginPath
Notifal (base)app/Infrastructure/WordPress/Hooks/ActionHooks.php, FilterHooks.php
Notifal Pronotifal-pro/app/Infrastructure/WordPress/Hooks/ActionHooks.php, FilterHooks.php

Prefer those constants over hard-coded strings. Load your callbacks on or after notifal/initialized. See Getting Started for Developers.

For working examples (custom tags, notification payload changes, and similar), use the Cookbook series rather than this reference.

Lifecycle and Bootstrap

Plugin boot, activation, migrations, infrastructure service registration, global settings, frontend asset registration, and event queue cron.

Hooks: Lifecycle and Bootstrap

Covers: notifal/initialized, notifal/activated, notifal/infrastructure/services, database migration hooks, module service provider filters, settings updates, frontend asset registration.

Notifications and Eligibility

On-page notification CRUD, save/load sanitization, campaign linkage, REST eligibility pipeline, timing/behavior/appearance configuration, frontend payload, and activation guards.

Hooks: Notifications and Eligibility

Covers: notifal/onpage_notification/saved, notifal/onpage/eligibility/data, notifal/onpage/eligibility/global_eligible, notifal/onpage/appearance/display_type_options, notifal/onpage/timing/, notifal/campaign/, import/export filters.

Related REST routes: REST API Reference.

Templates and Rendering

Template CRUD, HTML Builder widgets, Elementor widgets, preview iframe, import/export, and frontend class-placeholder processing.

Hooks: Templates and Rendering

Covers: notifal/template/, notifal/templates/, notifal/template/html_builder/widgets, notifal/elementor/*, notifal/template_renderer/shortcode_context.

Related architecture: Architecture Overview (Templates module).

Cookbook: Register a Custom HTML Builder Widget.

Tags and Dynamic Data

Tag registration, resolution, TagManager rendering, dynamic meta keys, WooCommerce product DTO, and date tag formatting.

Hooks: Tags and Dynamic Data

Covers: notifal/tag/register, notifal/tag/modify_value, notifal/dynamic_keys/*, notifal/woocommerce/product/dto.

Cookbook: Add Custom Dynamic Tag.

Display Rules and Content Source

Page targeting, display rule evaluation, content source pools (product, order, post, cart), smart targeting context, and client-side rule payloads.

Hooks: Display Rules and Content Source

Covers: notifal/onpage/display_rules/, notifal/onpage/content_source/, notifal/onpage/product_pool/, notifal/onpage/client__rules.

Analytics and Tracking

Impression/click/conversion tracking, event queue, analytics dashboard data, order attribution, and conversion settings.

Hooks: Analytics and Tracking

Covers: notifal/onpage/tracking/, notifal/onpage/analytics/, notifal/onpage/conversion/, notifal/order_attribution/.

Admin UI Extension

Admin menu, list tables, form fields, notification/campaign editor tabs, settings page, dashboard widget, and pre-created notification archive UI.

Hooks: Admin UI Extension

Covers: notifal/admin_menu/, notifal/field/, notifal/admin/onpage/, notifal/admin/list/, notifal/settings/page/*.

Hosted Notifal AI

Gateway URL, generation payloads, sanitized HTML, account lifecycle, and public JavaScript config for the Notifal AI client module (@since 3.0.0).

Hooks: Hosted Notifal AI

Covers: notifal/ai/, notifal/onpage/ai_prompt/, notifal/template/html_builder/ai_prompt_examples.

User guide: Connecting Your Notifal Account.

Forms

Public submit pipeline, validation, emails, integrations, Form CPT admin lifecycle, and frontend CustomEvents (@since 3.0.0).

Hooks: Forms

Covers: notifal/forms/submit/, notifal/forms/validate/, notifal/forms/email_, notifal/forms/integration_, form-id and field-name scoped hooks, notifal:form:* JavaScript events.

User guides: Notifal Forms Overview.

Cookbook: Extend Form Submit Lifecycle.

Pro Integration Bridge

Pro-only bootstrap action, infrastructure services, comment content-source bridge filters, and base notifal/* hooks that Pro modules implement.

Hooks: Pro Integration Bridge

Covers: notifal_pro/initialized, comment content-source bridge filters, and Pro ActionHooks / FilterHooks constants used for extension (not licensing).

Requires Notifal Pro. See Architecture Overview for how Pro modules attach to base hooks.

Conventions

TopicDetail
PrefixBase hooks use notifal/; Pro-specific hooks use notifal_pro/ or notifal_pro_*
Dynamic segmentsMany hooks append a field ID, tab slug, or widget slug (documented per article)
ConstantsNotifal\Infrastructure\WordPress\Hooks\ActionHooks and FilterHooks
Boot timingRegister on notifal/initialized; Pro logic may also wait for notifal_pro/initialized
SecuritySanitize inputs, escape output, verify nonces on admin/AJAX endpoints

Hooks series

  1. Hook Reference Hub (you are here)
  2. Hooks: Lifecycle and Bootstrap
  3. Hooks: Notifications and Eligibility
  4. Hooks: Templates and Rendering
  5. Hooks: Tags and Dynamic Data
  6. Hooks: Display Rules and Content Source
  7. Hooks: Analytics and Tracking
  8. Hooks: Admin UI Extension
  9. Hooks: Pro Integration Bridge
  10. Hooks: Hosted Notifal AI
  11. Hooks: Forms

Developers module