Daily Login Reward
A small wallet credit fired automatically on the customer's first login each calendar day. Drives habitual return visits without a coupon system.
Setting up?
Settings live under General Settings → Daily Login Reward section.
What It Does
| For | Means |
|---|---|
| Customer | Log in → tiny credit lands in wallet → activity feed shows "Daily reward" row |
| Admin | Habit-formation lever. Configurable amount + monthly cap so you can budget |
How Customers See It
- Log in
- Wallet credit fires (silently — no popup)
- Activity feed shows the credit row tagged "Daily login reward"
If the customer logs in multiple times the same day → only the first login earns the reward (calendar-date guard).

Setup
Wallet → Settings → General → Daily Login Reward

| Setting | Default | What it does |
|---|---|---|
| Enable | OFF | global toggle |
| Reward amount | 5 | currency value per login |
| Max per month | 30 | per-customer monthly cap (budget control) |
| Skip admins | ON | skip users with manage_options |
Anti-Abuse Built In
- Calendar-date guard (not 24-hour sliding) — multiple logins same day = one reward
- Monthly cap protects against high-frequency users
- Skip admins toggle is on by default
Common Scenarios
Reward only loyal customers
Use the eligibility filter (see dev section) to gate the reward by customer order history (e.g. "only customers with > 5 lifetime orders earn").
Streak bonus (e.g. 7-day login bonus)
Build a tiny snippet hooking the reward action — see dev section for a 12-line example.
Disable for a specific customer
Toggle the reward off for one user via a filter (wkwp_daily_login_eligible returning false for that user_id).
Increase reward during launch month
Raise "Reward amount" temporarily, lower back after.
Compatibility
| Auth method | Supported |
|---|---|
| Standard WP login | YES |
| WooCommerce Social Login | YES |
| Magic-link plugins | YES |
| Two-factor (after second factor) | YES |
REST API auth (no wp_login fire) | NO — fire the action manually if needed |
When Something Goes Wrong
| Problem | Fix |
|---|---|
| Reward not credited on login | Feature enabled? Already credited today? Hit monthly cap? |
| Admin getting rewards | Toggle "Skip admins" ON |
| Reward credits twice in a day | Should not happen (date guard). Check for duplicate wp_login listeners |
| Monthly count not resetting | Plugin self-resets on month change. Force-reset by clearing the user meta counter |
For developers — hooks + streak example
Hooks
| Hook | Type | When |
|---|---|---|
wkwp_daily_login_reward | action | after credit row written, args ($user_id, $amount) |
wkwp_daily_login_eligible | filter | gate the reward (return false to skip) |
wkwp_daily_login_amount | filter | mutate amount per user |
7-day streak bonus example
add_action( 'wkwp_daily_login_reward', function( $user_id, $amount ) {
$streak = get_user_meta( $user_id, '_wkwp_daily_login_streak', true ) ?: 0;
$last = get_user_meta( $user_id, '_wkwp_daily_login_last', true );
$yest = ( new DateTime( 'yesterday' ) )->format( 'Y-m-d' );
$streak = ( $last === $yest ) ? $streak + 1 : 1;
update_user_meta( $user_id, '_wkwp_daily_login_streak', $streak );
if ( $streak === 7 ) {
WKWP_Wallet_Core::credit( $user_id, 50, [
'reference' => 'daily_login:streak:7',
'note' => '7-day login streak bonus',
] );
}
}, 10, 2 );
Reporting
Filter Wallet → Transactions for type = credit + reference starting daily_login. CSV export available.
