Abuja Digital Studio · Est. 2018
Start a Project
DocsOLoyaltyGetting started
Getting Started

Getting started

OLoyaltyorravo.com/docs/oloyalty/getting-started

Getting started

Admin layout

With Orravo Core active, OLoyalty appears as a submenu under Orravo Core. Without Core, it gets its own top-level menu. The dashboard URL is wp-admin/admin.php?page=oloyalty.

The admin covers ten sections plus a few back-office views:

  • Dashboard - members, points, redemptions, liability snapshot
  • Members - search, edit, bulk actions
  • Points - earn rules, manual adjustments
  • Tiers - 2 to 10 VIP levels with perks
  • Rewards - reward catalogue
  • Gift Cards
  • Store Credit
  • Referrals - including a manual review queue for fraud-flagged referrals
  • Campaigns - multipliers, bonus, win-back, holiday
  • Reports
  • Migration - import from Smile.io and other providers via CSV
  • Settings

Members

Any WordPress user can become a loyalty member. OLoyalty_Members::ensure_for_user($user_id) creates the row in wp_oloyalty_members on first interaction (first order, signup with referral code, manual enrolment from admin). Each member has a unique referral_code (auto-generated, uppercase A-Z 0-9, used in ?ref=<code> links).

Earn points on order completion

The most common flow ships pre-wired. OLoyalty_Points::on_order_completed() hooks woocommerce_order_status_completed and woocommerce_order_status_processing. It:

  1. Resolves the member for the order's user.
  2. Checks wp_oloyalty_ledger for an existing earn on this order (idempotent).
  3. Evaluates the active order_placed earn rule against an order context (subtotal, currency).
  4. Records the ledger entry with an expiry date (per OLoyalty_Earn_Rules::compute_expiry_date()).
  5. Re-evaluates the member's tier.

OLoyalty also reverses points on refund or cancellation, controlled by the points.reverse_on_refund setting (default full).

Storefront entry points

Three shortcodes:

  • [oloyalty_balance] - show the logged-in member's balance
  • [oloyalty_rewards] - reward catalogue with redeem buttons
  • [oloyalty_referral] - referral code, share link, status

Plus a [oloyalty_refer_friend] landing page shortcode and three Gutenberg blocks: oloyalty/balance, oloyalty/rewards, oloyalty/referral.

Getting started · OLoyalty Docs | Orravo