Descripción
4WP Notifications delivers a unified in-app notification inbox for logged-in WordPress users: a header bell with unread badge, a full notifications page, optional WooCommerce order alerts, and tools for developers to fire notifications from custom code.
A plugin by 4wp.dev. 4WP is our project brand; the letters “WP” appear only as part of that brand name, not as a reference to WordPress. This plugin is not affiliated with, endorsed, or sponsored by WordPress.
Source code: github.com/4wpdev/4wp-notifications
Key features
- Notifications Bell block — dropdown with unread count; add inside a Navigation block (header menu)
- Notifications List block — full inbox page with mark read/unread and live polling
- Shortcodes —
[forwp_notifications_bell]and[forwp_notifications]for classic themes - Direct notifications — admins broadcast to roles and/or individual users
- WooCommerce — optional alerts for new orders and status changes
- Developer hooks —
forwp_notification_event/4wp_notification_eventfrom PHP - REST API — list, unread count, mark read/unread, and send notifications (authenticated)
Privacy
Notifications are stored in your WordPress database and shown only to the logged-in recipient. Read endpoints require an authenticated user session. Send endpoints require administrator capability (default: manage_options). No data is sent to 4wp.dev.
Development
Human-readable PHP source is in the public GitHub repository above. No npm build step — block editor scripts ship as plain JS in assets/blocks/.
Run tests: composer install && composer test && composer run lint
Blocks
This plugin provides 2 blocks.
- 4WP Notifications Bell (
forwp/notifications-bell) — bell icon and recent notifications dropdown (Navigation child block). - 4WP Notifications List (
forwp/notifications) — full notification list for a page.
Bloques
Este plugin proporciona 2 bloques.
- 4WP Notifications List Display the full in-app notifications list for the logged-in user.
- 4WP Notifications Bell Bell icon with a dropdown of recent notifications. Add inside a Navigation block (header menu).
Instalación
- Upload the plugin to
/wp-content/plugins/4wp-notifications/or install from the Plugins screen. - Activate 4WP Notifications.
- Open 4WP Notifications Display and choose the page for “View all notifications”.
- Add the Notifications List block to that page (or save Display settings to auto-insert it).
- Add the Notifications Bell block inside your header Navigation block.
- Optional: enable WooCommerce notification types under Notification types.
Preguntas frecuentes
-
Do visitors see notifications?
-
No. The bell and list render only for logged-in users.
-
Can I send a message to all customers?
-
Yes. Use Direct notifications, select the Customer role (or any role), and send.
-
Can developers send notifications from custom code?
-
Yes. Use the PHP hook
forwp_notification_eventor POST to/wp-json/forwp/v1/notifications(requiresmanage_optionsby default). See Documentation in the admin app. -
Does WooCommerce require extra setup?
-
Install WooCommerce, then enable event types under Notification types.
-
Are shortcodes still supported?
-
Yes. Blocks are recommended for block themes; shortcodes remain for classic content and menus.
Reseñas
No hay reseñas para este plugin.
Colaboradores y desarrolladores
Este software es de código abierto. Las siguientes personas han contribuido a este plugin.
ColaboradoresTraduce “4WP Notifications” a tu idioma.
¿Interesado en el desarrollo?
Revisa el código, echa un vistazo al repositorio SVN o suscríbete al registro de desarrollo por RSS.
Registro de cambios
1.2.0
- REST API POST — send notifications to
user_idoruser_ids(default capability:manage_options). - Developer hooks:
forwp_notification_eventand legacy4wp_notification_event. - Block editor assets for Bell and List blocks (inserter visibility and previews).
- Auto-insert Notifications List block on the configured page.
- Bell dropdown list refreshes on poll and when opening the menu.
1.1.0
- Unified admin app (Display, Direct, Types, Documentation) aligned with 4WP Drive / Weather.
- Notifications Bell block (
forwp/notifications-bell) for headers and navigation. - Shared frontend renderers for blocks and shortcodes.
- Role-based recipient targeting for direct admin notifications.
- WooCommerce notification type toggles in settings.
1.0.4
- Tabbed settings shell and notification type cards.
1.0.0
- Initial release: shortcodes, list block, WooCommerce adapter, REST read API.
