Unified in-app notifications for logged-in users. Part of the 4wp.dev ecosystem.
A reusable WordPress plugin that aggregates notifications from multiple sources (WooCommerce orders, admin messages, and optional integrations) into one list. No dependency on a specific project; adapters load only when the related plugin is active.
- Shortcodes
[forwp_notifications]/[4wp_notifications]— full list on a page; auto-refresh via REST polling.[forwp_notifications_bell]/[4wp_notifications_bell]— bell icon, unread badge, dropdown list; “View all” link configurable in settings.
- Block — Gutenberg block
forwp/notificationsfor the notification list. - Admin — Send custom notifications (one or multiple users via checkboxes); Settings to set the “page with all notifications” for the bell link.
- Integrations — WooCommerce adapter (new order, order status changed) loads only if WooCommerce is active. Mark read/unread; type icons (cart, megaphone); link icon when a notification has a URL.
- Sync — Marking read/unread on the notifications page updates the toolbar bell; marking in the toolbar updates the page list (custom event).
- Translations — English source strings; Ukrainian .po/.mo included in
languages/.
- Event — Integration or admin action pushes an event to the queue (or creates a notification directly for immediate cases).
- Queue + Worker — Action Scheduler processes events; worker inserts one row per notification.
- Storage — Custom table
wp_4wp_notifications:id,user_id,type,source,object_id,payload(JSON),is_read,created_at. - API — REST under
forwp/v1: list, unread count, mark read, mark unread, mark all read. - UI — Shortcodes and block; front end polls REST to refresh list and badge (no WebSocket).
Real-time: Polling (e.g. every 30s). WebSocket/push are planned as advanced options and require a separate service.
- Upload the plugin to
/wp-content/plugins/4wp-notificationsor install via WordPress admin. - Activate the plugin.
- In Notifications → Settings choose the page that will show the full list (and add
[forwp_notifications]to that page). - Place
[forwp_notifications_bell]where you want the bell (e.g. theme header or dashboard). Optionally override the icon via filterforwp_notifications_bell_icon_url.
- WordPress 5.8 or higher
- PHP 7.4 or higher
- Action Scheduler (e.g. from WooCommerce) recommended for the queue; sync fallback for immediate sends.
GPL v2 or later