Abuja Digital Studio · Est. 2018
Start a Project
DocsOMembershipEngagement
Reference

Engagement

OMembershiporravo.com/docs/omembership/engagement

Engagement (E6)

The Engagement engine is the absorbed feature set from the engagement absorption, now bundled as modules/engage/ and loaded automatically. It runs alongside the slim lifecycle/gamification glue that was already in OMembership.

Lifecycle automations

OMembership_Lifecycle::tick() runs hourly via omembership/lifecycle/run and dispatches typed events that OMailer subscribes to (other email plugins can hook too). Four campaigns fire idempotently:

CampaignWindowsEvent dispatched
WelcomeOn omem/membership/createdomem/lifecycle/welcome
Onboarding nudge1, 3, 7 days post-start, if no lesson completedomem/lifecycle/onboarding_nudge
Renewal reminder30, 7, 1 days before current_period_ends_atomem/lifecycle/renewal_reminder
Re-engagement14, 30, 60 days idleomem/lifecycle/reengagement
Win-back7, 30, 90 days post-cancel/expireomem/lifecycle/winback

Markers in wp_omem_events prevent double-sends.

XP and levels

XP totals live in wp_omem_xp (user_id, total_xp, level). omembership_award_xp() and the XP engine listen for built-in actions:

  • register, login, post_comment, create_post
  • fill_profile, follow_user, enable_2fa
  • woo_purchase, ld_lesson_complete, ld_course_complete
  • tutor_course_complete, email_opened

XP forwarding to OLoyalty is gated by engagement.badges_enabled and forwards omem/lesson/completed, omem/course/completed, and omem/reply/created through oloyalty/award_points.

Badges

Five badges are seeded on activation, stored in wp_omem_badges:

  • welcome - join the community
  • first-lesson - complete your first lesson
  • first-course - complete your first course
  • conversation - post your first reply
  • helping-hand - post 10 helpful replies

Badge awards land in wp_omem_user_badges (UNIQUE on user_id, badge_id).

Streaks

Daily-login streaks are recorded by StreakEngine::record_login() (called by the auth handler). User meta keys: omem_login_streak, omem_longest_streak, omem_last_login_date. The streak hook omembership_streak_updated fires for downstream integrations.

Leaderboard

OMembership_Gamification::leaderboard() returns a reply-count leaderboard from wp_omem_replies when engagement.leaderboard_enabled is true. The richer XP / level / badges leaderboard sits in the engagement module's Leaderboard::render() and is exposed via the [omembership_leaderboard] shortcode.

Capabilities

  • omem_manage_engagement - settings, lifecycle toggles
  • omem_manage_badges - badge CRUD, manual awards
Engagement · OMembership Docs | Orravo