WP Manifestindependent plugin directory
manifest / ecommerce / loyalty-rewards-for-woocommerce

Loyalty Rewards for WooCommerce

A complete, configurable loyalty points and rewards system plugin for WooCommerce, including purchase, signup, referral, birthday rewards, points redemption, customer management, and rewards history.

by Suraj Kumar Yadav · github.com/surajkumaryadav9749/loyalty-rewards-for-woocommerce · website

★ 0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/surajkumaryadav9749/loyalty-rewards-for-woocommerce/archive/refs/heads/main.zip

WC requires at least: 7.0 WC tested up to: 9.4

A complete loyalty points and rewards system for WooCommerce.

Description

Loyalty Rewards for WooCommerce is a reusable, production-ready points program for any WooCommerce store: clothing, grocery, electronics, restaurants, salons, digital products, and more.

It does not depend on a specific theme, page builder, or another loyalty plugin.

Features

  • Points for eligible purchases
  • Signup rewards
  • Referral codes and referral links
  • Birthday rewards via WP-Cron
  • Point redemption at cart and checkout
  • Admin dashboard with live statistics
  • Customer balances, history, and manual adjustments
  • Campaign management
  • Configurable rules (no PHP edits required)
  • WooCommerce High-Performance Order Storage (HPOS) compatible
  • Translation-ready

WooCommerce requirement

This plugin requires WooCommerce to be installed and active. If WooCommerce is missing or inactive, loyalty features do not initialize and an admin notice is shown. Existing loyalty data remains safe.

Setup

  1. Install and activate WooCommerce.
  2. Install and activate Loyalty Rewards for WooCommerce.
  3. Open Loyalty Rewards in the WordPress admin.
  4. Review Campaigns, Rewards, and Settings.
  5. Save. Customers can then earn and redeem points.

Default program values (all configurable):

  • Signup: 50 Points
  • Purchase: 10 Points for every 100 spent
  • Referral: 100 Points after the referred customer’s first eligible purchase
  • Birthday: 100 Points once per year
  • Redemption: 1 Point = 1 store currency unit

Campaigns

Manage earning rules from Loyalty Rewards → Campaigns.

  • Points for Purchase
  • Signup
  • Referral
  • Birthday

Each campaign can be enabled, disabled, and edited. Disabled campaigns never award points. Existing balances are unchanged.

Rewards

Customers redeem points for a WooCommerce cart discount. The discount uses the store currency (wc_price() / WooCommerce currency settings). Point value, minimum, and maximum are configurable.

Points are reserved at checkout and deducted from the ledger only after the order reaches an eligible paid status. Failed or cancelled unpaid checkouts do not permanently remove points.

Referrals

Every customer receives a unique referral code and URL on the current site (the domain is never hardcoded). Attribution is stored when a visitor uses the link and later creates an account. The referrer is rewarded only when the configured success condition is met (default: first eligible purchase). Self-referrals and duplicate rewards are blocked server-side.

Birthday

Customers can enter Date of Birth on My Account → Account Details. A daily WP-Cron job awards birthday points once per calendar year using a unique ledger reference.

Points Redemption

Logged-in customers apply points on cart and checkout. The plugin validates nonce, user, and available balance on the server. The discount is applied as a WooCommerce cart fee.

My Account

A native WooCommerce My Account endpoint (default slug/label: Points) shows balance, value, ways to earn, history, and referral tools.

Security

  • manage_woocommerce capability checks
  • Nonces on admin and AJAX requests
  • Sanitization, validation, and escaping
  • $wpdb->prepare() for SQL
  • Unique ledger references to prevent duplicate awards
  • Server-side redemption and referral validation

Hooks / filters

Developers and a future Pro add-on can extend the plugin with:

  • lrw_initialized
  • lrw_register_campaign_types
  • lrw_reward_types
  • lrw_purchase_points_to_award
  • lrw_purchase_eligible_amount
  • lrw_signup_points_to_award
  • lrw_referral_points_to_award
  • lrw_birthday_points_to_award
  • lrw_points_transaction_recorded
  • lrw_customer_roles
  • lrw_daily_cron_complete

Installation

  1. Upload the loyalty-rewards-for-woocommerce folder to /wp-content/plugins/.
  2. Activate the plugin through the Plugins screen.
  3. Confirm WooCommerce is active.
  4. Open Loyalty Rewards and configure campaigns.

Frequently Asked Questions

Does this work without WooCommerce?

No. WooCommerce is required. The plugin will not crash if WooCommerce is missing; it will pause loyalty features and show an admin notice.

Can I change how many points customers earn without editing code?

Yes. Change values under Loyalty Rewards → Campaigns or Settings. New awards use the saved values immediately.

Which currency symbol is used?

The plugin uses WooCommerce currency formatting. It does not hardcode ₹, $, or any other symbol.

What happens on uninstall?

By default, all loyalty data is kept. Enable Delete data on uninstall in Settings only if you want tables, options, and plugin user meta removed. WooCommerce orders and other plugins’ data are never deleted.

Is this compatible with HPOS?

Yes. Compatibility is declared, and order data is read through WooCommerce CRUD APIs (wc_get_order()), not wp_posts.

Can guests earn points?

Purchase and signup rewards require a customer account. Guest orders are ignored for points.

Changelog

1.0.0

  • Initial release.

Upgrade Notice

1.0.0

Initial public release.

Troubleshooting

  • If the My Account Points page 404s, go to Settings → Permalinks and save, or re-activate the plugin so rewrite rules flush once.
  • If birthday rewards do not run, confirm WP-Cron is working and check Loyalty Rewards → System Status.
  • Review WooCommerce → Status → Logs using source loyalty-rewards.