calculate_points($example_order); ?>

Loyalty Rewards Settings

Points Configuration

> >
Points Calculation Mode

How much currency equals 1 point.
Example: If set to 200, then 200 = 1 point, so an order of 1,000 = 5 points.

How many points per 1 currency unit.
Example: If set to 0.005, then 1 = 0.005 points, so an order of 1,000 = 5 points.

Points Calculator
Result: points

Minimum order total required to earn points (0 = no minimum).

points

Bonus points for new customers (awarded on first order).

💳 Checkout Points Redemption

Allow customers to use their points as partial payment at checkout.

Customers will see an option to apply points before payment method selection.

per point

How much currency each point is worth when redeeming at checkout.
Example: If set to 100, then 10 points = 1,000 discount.

Rewards Configuration

Products in this category will be available as rewards. Product price = points required to redeem.
You can override this by adding a custom field _lrwc_points_cost to individual products.

Current Rewards:

get_available_rewards(); if (!empty($rewards)): ?>
  • - points (Out of stock)

No products found in the selected category.

Tier Thresholds

Points required to reach each tier (based on total points balance).

0 points (default tier)
points
points
points

Branding

Shortcodes

Customer App [lrwc_loyalty_app]

Displays the customer loyalty dashboard with QR code, rewards, and history.

Staff Scanner [lrwc_loyalty_staff]

Displays the staff scanner interface for adding points and processing redemptions.

My Account Tab

A "Loyalty Points" tab is automatically added to WooCommerce My Account page.

⚠️ Danger Zone

get_var("SELECT COUNT(*) FROM {$wpdb->usermeta} WHERE meta_key = 'lrwc_points_balance' AND meta_value > 0"); $total_points = $wpdb->get_var("SELECT COALESCE(SUM(CAST(meta_value AS SIGNED)), 0) FROM {$wpdb->usermeta} WHERE meta_key = 'lrwc_points_balance'"); $total_transactions = $wpdb->get_var("SELECT COUNT(*) FROM {$wpdb->prefix}lrwc_transactions"); $total_redemptions = $wpdb->get_var("SELECT COUNT(*) FROM {$wpdb->prefix}lrwc_redemptions"); $orders_with_points = $wpdb->get_var("SELECT COUNT(*) FROM {$wpdb->postmeta} WHERE meta_key = '_lrwc_points_awarded'"); ?>
Current Data:
  • Customers with points:
  • Total points in circulation:
  • Transaction records:
  • Redemption records:
  • Orders with points awarded:
🔴 FULL RESET

Completely wipes all loyalty data and starts fresh.
This will reset all points balances, delete all transactions, delete all redemptions, and clear order flags so they can be re-processed.