=== Loyalty Card Manager ===
Contributors: My Island Designs  
Website URL: https://www.myislanddesigns.com/loyalty-card-manager-wordpress-plugin/  
Tags: loyalty card, customer rewards, punch card, email notifications, WooCommerce alternative  
Requires at least: 5.0  
Tested up to: 6.5  
Stable tag: 3.07  
License: GPL v2 or later  
License URI: https://www.gnu.org/licenses/gpl-2.0.html  

A lightweight, self‑hosted loyalty card system for WordPress. Track visits, add service notes, send automatic reward emails, and show progress with easy shortcodes—no monthly fees.

== Description ==

**Main features**

* Add cardholders with name, email, and phone.
* Track progress toward any stamp goal (default 10).
* Log every visit automatically—timestamp plus optional service note.
* Fire a reward email the moment the goal is met, then reset progress and increment redemptions.
* Show customer progress and redeemed counts with two flexible shortcodes.
* Live search popup and CSV import/export for fast admin work.
* Control optional fields, email templates, and stamp goal from a simple settings page.

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/` or install via **Plugins → Add New → Upload**.  
2. Activate the plugin.  
3. Go to **Loyalty Cards** in the dashboard to set your stamp goal and email defaults.  
4. Add cardholders—or create them during the first check‑in.  
5. Place `[loyalty_cards]` or `[lcm_card_status]` on any page to show progress on the front end.

== Changelog ==







= 3.07 =
* Stable release without the Reconcile UI.
* Keeps summary `progress` in sync when you manually add/remove visits on the Cardholder Details page.
* Ensures new manual visits store the current Service in `service_note` so it appears after the date.
* All other 3.05 features remain: Add at top, Quick Edit in-page, and +/- update visit history.

= 3.05 =
* Fix: After adding a cardholder, redirect to clean URL and show the full Quick Edit panel (no stray delete confirmation).
* Robust: Only show Delete confirmation when `delete=1` is present and there is no in-flight POST.

= 3.04 =
* Fix: Prevent duplicate/blank inserts by routing to paginated view BEFORE legacy handlers.
* Fix: Service now appears after the date on Cardholder page; new visits include service_note.
* Robust: Add form accepts both lcm_* and plain field names.

= 3.03 =
* Fix: Prevent duplicate/blank row on Add (server-side required Name).
* Fix: Delete via Quick Edit (with confirmation) + cascade delete of visit history.
* Fix: Progress +/- now mirrors Visit History (insert/delete visits).
* Fix: Quick Edit progress syncs visit records to match the new value.
* UX: Actions -> Delete leads to confirmation in Quick Edit instead of accidental deletion.

= 3.02 =
* New: Add Cardholder form at top of paginated admin page.
* New: Quick Edit on paginated page (no need to jump to legacy editor).
* New: Inline +/- controls to adjust Visits (Progress) per row.
* Improved: Edit buttons now open Quick Edit within the paginated page.
* Perf: `updated_at` now stamps on add/edit/progress updates to keep Recent 50 accurate.

= 3.01 =
* New: Default **Recent 50** view (last edited/added).
* New: **All** view with server-side pagination (100/page).
* New: **A–Z** filter chips and **Edited Today / This Week** quick filters.
* UX: **Legacy Editor** preserved; your existing edit/save/delete handlers untouched.
* Perf: Adds `updated_at` with backfill + indexes; auto-stamps `updated_at` on insert/update.

= 2.7.16 =  
* Redemption counter now increments correctly on every reward.

= 2.7.15 =  
* Split shortcode duties: `[loyalty_cards]` shows active cards; `[lcm_card_status]` shows the redeemed list and logged‑in user card.  
* Redeemed list query now pulls from the `redemptions` column.

= 2.7.14 =  
* Fixed timezone output—timestamps respect EST/EDT automatically.

= 2.7.13 =  
* Auto‑creates or repairs `loyalty_visits` table with `service_note` column.  
* Visit logging now writes timestamp plus service note in one step.

= 2.7.10 – 2.7.12 =  
* Added service‑note input that clears after save.  
* Visit Timeline displays “Date – Service” lines.

= 2.6.0 =  
* Added live AJAX search popup for front‑end look‑ups.  
* Import/export CSV for easy backups and bulk edits.

= 2.5.5 =  
* Fixed visit logging during progress updates.  
* Moved Visit Timeline below cardholder details.

= 2.5.0 =  
* Added “View Visits” button and detail page with email form.  
* Notes column in admin list is now editable inline.

= 2.4.5 =  
* Added optional‑field checkboxes for email/phone.  
* Initial readme included.

= 2.0.0 =  
* Complete admin UI overhaul with WordPress styling.  
* Introduced shortcode system and progress bar graphics.  
* Added settings page for custom email templates and stamp goal.

= 1.5.0 =  
* Switched from storing timestamps in local time to GMT for reliable daylight‑saving handling.  
* Added PHPMailer filters to override default “From” name and email.

= 1.2.0 =  
* Implemented automatic reward email with progress reset.  
* Added database upgrade routine for seamless version bumps.

= 1.0.0 =  
* First public release: add cardholders, track checkmarks, display progress in the admin area.

== License ==

This plugin is distributed under the GPL v2 license.
