=== Attendra – Client Attendance Manager ===
Contributors: simpledigital
Tags: appointments, booking, scheduling, attendance, sessions
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 8.0
Stable tag: 1.4.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Book appointments, sell session packages and track client attendance inside WordPress. No monthly fees, no external platforms, no SaaS lock-in.

== Description ==

**The WordPress appointment booking and client management plugin built for service businesses.**

Attendra lets you manage clients, appointments, session packages and attendance directly inside WordPress — without spreadsheets, without SaaS fees, and without handing your data to a third-party platform.

If you run a gym, fitness studio, tutoring center, therapy practice, coaching business or any service where clients buy sessions in packages, Attendra gives you a complete workflow in one place.

**No monthly fees. No external platforms. Your data stays on your server.**

= Who is this for? =

- Personal trainers and fitness studios
- Yoga, pilates and wellness studios
- Tutors, language schools and learning centers
- Therapists, psychologists and coaches
- Consultants and 1-to-1 service providers
- Sports clubs and after-school programs
- Any business that sells services by session or package

= Core Features =

**Appointment booking and scheduling**
Create and manage private 1-to-1 appointments. Assign a client, service, staff member, date and duration. Track status from Pending through Confirmed, Attended or Cancelled. Full lifecycle with automated email notifications at every step.

**Session packages and entry tracking**
Sell sessions in packages. Each client gets a configurable number of entries per service. When a session is attended, entries are deducted automatically. Low-package and exhausted-package alerts are sent by email.

**Attendance tracking without spreadsheets**
Log sessions directly from the admin or let staff mark attendance from the frontend. Always see how many sessions each client has used and how many remain.

**Automated email notifications**
Booking confirmed, cancelled, rejected, no-show, pending payment, reminder before the appointment, package running low, package exhausted, new package started — all triggered automatically, to the client and optionally to admin and staff. Customize every template directly in Settings. Emails include client notes if you add them to the appointment.

**Client portal**
Each client gets a personal portal page where they can see their upcoming appointments, remaining sessions, attendance history and package status. No extra plugin needed.

**Staff portal**
Give staff a clean frontend page to mark attendance without touching wp-admin. Fully scoped to assigned services and clients only.

**Public booking calendar**
Display your schedule on any page with `[attendra_public_calendar]`. Visitors can see available sessions and request bookings.

**Reporting dashboard**
See occupancy rate, no-show rate, revenue collected, most booked services, active clients and packages running low — for any date range you choose.

**Recurring appointment series**
Create a recurring appointment series for a client with a single action. Manage the whole series or individual sessions.

**Appointment rescheduling and cancellation rules**
Reschedule any appointment from the admin editor or staff portal — change the date, time, or service. Set a limit on how many times a booking can be rescheduled, and a late cancellation window (e.g. no cancellations within 24 hours of the session). Both are configured in Settings → Booking.

**Group booking with capacity limits**
Group services (Weekly / One-time) support a configurable maximum number of bookings per session. When the limit is reached, the slot is closed automatically. Useful for group classes, workshops, or any fixed-capacity event.

**Package expiration dates**
Each client package can have an optional expiration date. When the package expires, new sessions are blocked automatically.

**Appointment notes**
Attach client-facing notes to any appointment — these appear in the confirmation and reminder emails. Internal notes are also available for admin-only observations that are never sent to the client.

**Client attendance confirmation**
Clients can confirm attendance from the portal ("I'm coming") for upcoming group sessions. This creates a confirmed booking and removes the slot from the available list.

**Mobile-first Staff and Client portals**
The Staff Portal and Client Portal support a dedicated mobile template that removes the theme header and footer, giving both portals a full-screen, app-like layout. Apply it with one click from the Setup Guide or Settings → Mobile Template. Works across all themes without customization.

**CSV client import**
Import clients in bulk from a spreadsheet using the provided template. Optionally create WordPress portal accounts automatically.

= Flexible Pricing and Payment Tracking =

Set a base price per session on each service. Per-client package pricing supports custom discounts and package totals. Every booking snapshots the effective price at the moment of creation so your records stay accurate even when you adjust pricing later.

Packages support full payment or split installments. Track how much has been paid, how much is still outstanding, and confirm individual payments directly from the client profile. A "Payment received" email is sent to the client automatically when each payment is confirmed.

= Customizable Labels =

Rename "Client", "Service", "Package" and "Session" to match your business language. Settings are available under **Attendra > Settings > Labels**.

= Your Data, Your Server =

Attendra is fully self-hosted. No API calls to external services, no subscription required, no SaaS lock-in. All data is stored in your own WordPress database.

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/` or install from the WordPress Plugins screen.
2. Activate **Attendra** under **Plugins**.
3. Follow the Setup Guide or go to **Attendra > Settings** to configure labels and features.
4. Create portal and calendar pages, then add the shortcodes:
   - `[attendra_portal]` — client-facing portal
   - `[attendra_staff_portal]` — staff attendance interface
   - `[attendra_public_calendar]` — public schedule and booking
5. Create your services under **Services**, then create clients and assign services to them.
6. Set package entries per client-service pair in the **Package** metabox on the client edit screen.
7. Start booking appointments or logging sessions.

== Frequently Asked Questions ==

= What kind of businesses can use Attendra? =

Any business that sells services by session or package. The most common use cases are personal trainers, yoga studios, tutoring centers, therapists, coaches and sports clubs — but the labels and workflow are fully customizable to fit any service-based business.

= Is this a booking plugin? =

Yes. Attendra supports public-facing appointment requests via the `[attendra_public_calendar]` shortcode, private admin-created appointments with a full status lifecycle, and recurring appointment series.

= Does Attendra work without WooCommerce? =

Yes. Attendra is completely independent of WooCommerce. It has its own pricing, billing mode and payment status system.

= Do I need a monthly subscription? =

No. Attendra is a self-hosted WordPress plugin. You pay once (or use the free version) and there are no recurring fees. All data stays on your own server.

= How does session tracking work? =

Each client has a configurable number of entries per service. When you log a session or mark an appointment as attended, entries are deducted automatically. You always see how many sessions remain per client per service.

= How do appointments work? =

Appointments are created from **Attendra > Appointments** or from a client edit screen. Each appointment is linked to a client, service and optionally a staff member. You track the date, duration, status, billing mode (package credit, pay per session, or free) and payment status.

= Can I create recurring appointments? =

Yes. When creating an appointment you can set it to repeat on a schedule and generate a full series. You can manage the whole series or individual sessions within it.

= How do automated emails work? =

Attendra sends emails on key events: appointment confirmed, cancelled, rescheduled, reminder 24 hours before, package running low, package exhausted, and more. All templates are editable in **Attendra > Settings > Email Templates**.

= Can someone else pay for a client — like a parent or a company? =

Yes. On the client profile, select "Someone else pays for this client" under Payer Type, then create a portal user. The account will be created with the **Payer** role instead of the Client role. Both roles have identical portal access — the distinction is purely organisational, so you can see at a glance in your WP Users list who is a self-paying client and who is an external payer.

= Can clients see their own appointments and sessions? =

Yes. The `[attendra_portal]` shortcode gives each client a personal portal page where they can see their upcoming appointments, remaining sessions and full attendance history.

= Can staff mark attendance without admin access? =

Yes. The `[attendra_staff_portal]` shortcode creates a frontend page where staff can log attendance quickly. Access is limited to services and clients assigned to that staff member.

= Can sessions be deleted? =

Yes. Sessions can be soft-deleted with a required reason. Deleted sessions are kept in history and do not consume entries.

= How does the public calendar work? =

The `[attendra_public_calendar]` shortcode displays your service schedule. Visitors can see available sessions and request a booking. Services must have a valid schedule and be set to show in the calendar.

= Can I import clients from a spreadsheet? =

Yes. Use **Attendra > Import** to upload a CSV file. Download the template from the same page, fill it in with your client data, and import. You can optionally auto-create WordPress user accounts for each client.

= What happens when I uninstall? =

Roles, capabilities and plugin settings are removed automatically. Client and service data is only deleted if **Delete data on uninstall** is enabled in plugin settings.

= Can I reschedule appointments? =

Yes. Open any appointment from the admin editor or the Staff Portal and change the date, time, or service. You can also set a maximum number of allowed reschedules per booking in Settings → Booking.

= What happens when a client does not show up? =

Set the appointment to No Show. The session is still recorded and deducted from the client's package balance. An automatic no-show email is sent to the client.

= Can I set cancellation rules? =

Yes. In Settings → Booking you can configure a late cancellation window (in hours). You can also limit how many times a booking can be rescheduled.

= Can clients confirm attendance in advance? =

Yes. The client portal shows upcoming group sessions with an "I'm coming" button. When the client clicks it, a confirmed booking is created and the slot is removed from the available list.

= Can I set a package expiration date? =

Yes. Each package has an optional expiration date. When the date passes, new sessions are blocked automatically and the client receives an email when the package is started with the expiry date included.

= Can I manage group classes with a capacity limit? =

Yes. Group services (Weekly and One-time) support a configurable maximum capacity per session. When the limit is reached, the slot is closed to new bookings automatically.

= Can I add notes to appointments? =

Yes. Every appointment has two note fields: **Client Notes** (visible to the client, included in confirmation and reminder emails) and **Internal Notes** (admin-only, never sent to the client). Staff can also edit client notes from the Staff Portal.

= Does Attendra work with my existing email setup? =

Yes. Attendra sends all emails through the standard WordPress `wp_mail()` function. If you use an SMTP plugin (WP Mail SMTP, FluentSMTP, Postmark, etc.) Attendra automatically uses it — no extra configuration needed.

= Can staff receive a daily schedule by email? =

Yes. Enable the daily schedule summary for staff in Settings → Staff Notifications. Each staff member gets an email every morning with their appointments for the following day.

= Can I customize the words "Client", "Service", and "Sessions"? =

Yes. Go to Settings → Labels and rename any of the core labels. The new names appear throughout the admin, portals, and emails. Useful if your business uses "Student", "Class", or "Treatment" instead.

= Can I split a package payment into instalments? =

Yes. When creating a package for a client, choose Installments and set the number of payments. The package total is split evenly across each instalment. Confirm payments one by one from the client profile — each confirmation updates the amount paid and sends an automatic "Payment received" email to the client.

= What financial data does the Reporting page show? =

The Reporting page includes a Financial Summary section with total collected, total pending, packages sold, and sessions paid — for any date range you choose. All figures are based on actual package payments confirmed in your system.

= Does Attendra replace Excel or a spreadsheet? =

Attendra replaces the common pattern of managing clients, session counts, packages, and attendance in a spreadsheet or shared Google Sheet. Everything is stored in your WordPress database — searchable, filterable, and linked across clients, services, and appointments.

= Does Attendra integrate with Google Calendar, Stripe, or WooCommerce? =

Not currently. Attendra does not sync with Google Calendar, does not process payments through Stripe or PayPal, and does not extend WooCommerce. It is a self-contained system for managing sessions and attendance. Payment tracking is manual — you record whether a session was paid, not paid, or handled via package credit.

= What is Attendra NOT suitable for? =

Attendra is not a good fit for businesses that need: online payments at booking time, Google Calendar sync, SMS or WhatsApp notifications, multi-location management (separate rooms or branches), or booking for services that do not follow a session/package model (e.g. hourly rental, hotel rooms, restaurant tables).

= Is this plugin translation-ready? =

Yes. All strings use the `attendra` text domain and a `.pot` file is included.

== Screenshots ==

1. Easy onboarding: set up your attendance system in minutes with the step-by-step guide.
2. Reporting dashboard: occupancy rate, no-shows, revenue, active clients and packages running low at a glance.
3. Service setup: configure schedules, pricing, booking settings and staff assignment.
4. Client management: assign services, set package entries and track attendance history.
5. Appointment booking: create and manage 1-to-1 appointments with full status and billing tracking.
6. Attendance tracking: log sessions quickly and see remaining entries per client per service.
7. Public calendar: display your schedule and accept booking requests on any page.
8. Client portal: give every client full visibility over their sessions, appointments and package status.

== Changelog ==

= 1.4.0 =
* Public booking calendar with session booking requests (`[attendra_public_calendar]`)
* Recurring appointment series — create a full series in one step, manage or cancel individually
* Staff Portal frontend with Attendance, Appointments and Enrollment tabs
* Client Portal with upcoming appointments, session history, "I'm coming" self-confirmation and 1-to-1 self-booking
* Mobile template for Staff and Client portals — full-screen app-like layout, applied with one click
* Payment installments — split package payments across multiple instalments, confirm each individually with automatic "Payment received" email
* Financial Summary in Reporting — total collected, total pending, packages sold, sessions paid
* CSV client import with optional bulk portal account creation
* Per-service base pricing and per-client package discount with booking price snapshots
* Walk-in attendance for group services
* Package expiration dates — block new sessions automatically when a package expires
* Appointment rescheduling limits and late cancellation window
* Group service capacity limits — close slots automatically when full
* Automated email notifications for all booking lifecycle events including payment received
* Staff daily schedule summary email
* Guide banners on each admin page with permanent dismiss
* Staff optional permissions: can edit service details, can edit clients

= 1.3.3 =
* Private 1-to-1 appointments with client, service, staff, status, billing mode and package-credit recording
* Client portal appointment visibility
* Appointment status lifecycle with admin email notifications

= 1.3.2 =
* Custom post type capability hardening
* Translation template regeneration
* Frontend style and script cleanup

= 1.0.0 =
* Initial release

== Developer Notes ==

To regenerate the translation template:
`wp i18n make-pot . languages/attendra.pot --exclude=assets,vendor,node_modules --slug=attendra`
