Skip to content
Learnomy

Notifications

Learnomy shows logged-in learners a notification bell with a dropdown feed of their unread in-app alerts -- enrollments, course completions, quiz results, certificates, payments, announcements, and more. This is the on-site alert center, separate from any email a learner receives.

What you can do

  • See a bell with an unread badge on Learnomy frontend pages while logged in.
  • Open a dropdown feed of your most recent unread notifications, each with an icon, title, message, and a relative time such as "3 hours ago".
  • Mark a single notification read by clicking it, or clear the whole list with Mark all read.
  • Get alerts for the events that matter to a learner -- new enrollment, course completed, quiz result, certificate issued, payment receipt, membership changes, and site announcements.
  • Rely on it being private -- the feed only ever shows the current user's own notifications.

Notifications first view

How to use it

Step 1 -- log in and find the bell

The bell is added to Learnomy frontend pages for logged-in users. When you have unread notifications, a count badge appears on the bell.

Step 2 -- open the feed

Click the bell to open the dropdown. It lists your most recent unread notifications, newest first. If there are none, it shows "No new notifications."

Step 3 -- read and clear

Click any notification to mark it read. Use Mark all read in the panel header to clear every unread notification at once. The unread badge updates as you go.

Settings and options

  • In-app, not email. The bell is the on-site notification center. It is distinct from a learner's email notifications and email preferences, which are configured separately.
  • Unread-focused. The dropdown shows unread notifications (up to the most recent ones); reading or marking all read empties the list.
  • Dark mode. Learnomy follows your theme's colour scheme. It does not show its own dark-mode toggle, because a plugin-only switch on top of a theme is a way for the two to disagree, not a feature. If your theme has no dark mode of its own and you want to give members the switch, a developer can turn it on with add_filter( 'learnomy_standalone_dark_mode', '__return_true' ); and the toggle then appears next to the bell.
  • Notification types. Each type has its own icon -- for example a graduation cap for enrollment, an award for a certificate, a megaphone for an announcement -- and a human-readable label used on admin surfaces such as the Email Log.

For developers

REST API (namespace learnomy/v1, all endpoints require a logged-in user):

  • GET /notifications -- recent notifications for the current user (limit, default 20, max 50).
  • GET /notifications/unread-count -- the current user's unread total.
  • PATCH /notifications/{id}/read -- mark one notification read (owner only; returns 404 for a row that is not the caller's).
  • POST /notifications/mark-all-read -- mark every unread notification read.

Model and data:

  • Learnomy\Models\Notification -- create, read, and mark-read logic over the lrn_notifications table. Notifications are keyed to a recipient user_id with type, title, message, is_read, and created_at.
  • Notification::type_label( $type ) -- resolves a type slug to a human label, filterable with learnomy_notification_type_label.

Frontend:

  • The bell partial (templates/partials/notification-bell.php) is included on frontend pages for logged-in users and is driven by the Interactivity API store learnomy/notifications.