=== Albertoit Client Management for Coaches ===
Contributors: albertosoliman
Tags: clients, coaching, life coach, client management, CRM
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.6.9
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Manage private coaching clients, sessions, relationships, and payments in WordPress.

ALBERTOIT CLIENT MANAGEMENT FOR COACHES
==================

Version: 1.6.9

Manage private coaching clients, sessions, relationships, and payments in WordPress.

Designed by Albertoit.com
https://albertoit.com/

FEATURES
--------
- Private Clients section in WordPress Admin.
- Add, edit, delete, search and view clients.
- Automatic permanent serial numbers starting at CL-1550: CL-1550, CL-1551, CL-1552, etc.
- Optional client fields except Full Name.
- Unlimited coaching records per client.
- Session location: Online, In Clinic, or Outside Clinic.
- Multiple private attachments per coaching record for reports, medication documents, and other files.
- Unlimited payment records per client.
- Session payment status: Paid, Unpaid, or Partially Paid.
- Sessions can be marked unpaid when the client will pay later; marking paid creates a linked payment entry.
- Client Relationships with mirrored relationship labels (for example Wife ↔ Husband/Partner).
- Readable permanent Activity Log with stored before/after or deleted details.
- In-admin optional PayPal donation/support link; nothing is added to the public site.
- Separate EUR and EGP totals; currencies are never combined.
- No subscriptions, external APIs, paid services, or external data storage.
- Client information is stored in the site's WordPress database.
- Client records are not public WordPress posts/pages.
- Admin access is restricted by the manage_lifecocl_clients capability.
- REST endpoints containing "lifecocl" are blocked.

INSTALLATION
------------
1. In WordPress Admin, go to Plugins > Add New > Upload Plugin.
2. Upload Albertoit-Client-Management-for-Coaches-1.6.9.zip.
3. Install and activate the plugin.
4. Open the new Clients menu in WordPress Admin.
5. Add your first client.

PERMISSIONS
-----------
On activation, the plugin grants the manage_lifecocl_clients capability to administrator users.
Only users with this capability can access the Clients admin area.

PRIVACY
-------
The plugin does not create public-facing client profiles, shortcodes, public REST endpoints, or public post types. Client data remains in custom database tables and is accessible through the protected WordPress Admin interface.

IMPORTANT
---------
This plugin is designed for private coaching records. Site owners should still use HTTPS, strong administrator passwords, appropriate WordPress roles, regular backups, and a privacy policy appropriate to their jurisdiction and use of personal data.

DATABASE TABLES
---------------
{prefix}lifecocl_clients
{prefix}lifecocl_coaching_records
{prefix}lifecocl_payments
{prefix}lifecocl_funds

Designed by Albertoit.com
https://albertoit.com/

LANGUAGE
--------
English is the default. The plugin is prepared for WordPress localization so a future Arabic translation can follow the site's WordPress language rather than requiring a separate plugin build.

MOBILE USE
----------
The WordPress Admin interface is responsive and can be opened on an iPhone. For regular use, the recommended approach is to create a dedicated WordPress user with the manage_lifecocl_clients capability and add the Clients admin URL to the iPhone Home Screen. A later version can add a dedicated installable PWA-style Coach Portal while keeping WordPress login/security. Avoid passwordless shared links for client data because they reduce account-level security.


UPDATE BEHAVIOR
The plugin keeps the same WordPress plugin slug/folder name (albertoit-client-management-coaches) and uses an incremented plugin version so uploading a newer ZIP is recognized as an update rather than a separate plugin. Existing client data is migrated from the legacy 1.6.4 table/option names to the prefixed 1.6.6 names during the update and is preserved.


Version 1.4.0 financial workflow:
- Each client can have an individual default session price and currency.
- Every new coaching record automatically creates a linked Session Charge in Payment History.
- Session date can be today or any future date.
- Fund / Top Up lets you prepay an amount and specify the number of sessions. Example: 50 for 5 sessions gives an allocation of 10 per session.
- A coaching record can select an available Fund / Top Up and automatically deduct the session charge from it.
- Payment History separates money received/funded from session charges used, and EUR/EGP totals remain separate.
- Empty money fields are treated as 0.00 instead of being required.


Version 1.4.0 improvements:
- Coaching Records include Payment Method and Payment Note fields, automatically linked to the session's Payment History entry.
- Payment History entries can be edited for Payment Method and Note without changing the amount, date, currency, or transaction type.
- Payment History is displayed immediately after the financial totals; Funds / Top Ups are shown below it.
- Future coaching session dates remain supported.
- Available Fund Balance is shown separately from historical Received / Funded totals so prepaid money is not mistaken for money still available.
- Fund / Top Up usage updates the fund's remaining amount and remaining session count automatically.
- The plugin slug/folder and main plugin filename remain stable: albertoit-client-management-coaches/life-coach-clients.php.


Version 1.6.1 business model
----------------------------
The Free plugin is intended to remain useful on its own and is suitable for personal use and submission to WordPress.org. Premium functionality can be offered separately as a Pro add-on/plugin or service, rather than locking existing Free functionality behind a license key.

Support
-------
An optional donation link is available only inside the plugin's private WordPress Admin area.



CHANGELOG
---------

1.6.2
- Improved nonce verification recognition for admin data-changing actions.
- Unslashed and sanitized POST, REQUEST, GET and file-upload input before processing.
- Added explicit GPLv2 or later license declaration to the readme.
- Kept private uploads on the WordPress upload API using wp_handle_upload().
- Updated the in-admin Pro link to https://albertoit.de/.
- Removed development/macOS metadata files from the package.


CHANGELOG
---------

1.6.4
- Added direct nonce verification to each state-changing admin action handler for clearer Plugin Check recognition.
- Documented read-only GET parameters where nonce verification is not applicable.
- Replaced direct unlink() calls with wp_delete_file().
- Replaced direct readfile() attachment streaming with the WordPress filesystem API while preserving binary downloads.
- Escaped generated Activity Log HTML at the output boundary with wp_kses_post().
- Kept the documented uninstall.php database cleanup pattern, with explicit Plugin Check suppressions for plugin-owned schema deletion.
- Extended optional uninstall cleanup to all plugin tables and currency settings.


Version 1.6.6
- Renamed only the top-level WordPress admin menu label from Clients to AIT Clients.
- Incremented the plugin version so WordPress recognizes this package as an update.
- Updated the plugin display name to a distinctive Albertoit-branded name while keeping the current WordPress.org slug albertoit-client-management-coaches.
- Added the WordPress.org contributor username albertosoliman.
- Added a distinctive lifecocl_ prefix to plugin declarations, capabilities, options, database tables and WordPress-owned identifiers.
- Moved the top-level Clients menu to a lower admin-menu position.


= 1.6.9 =
* Unified all prefixes to `lifecocl` for better compatibility and to comply with WordPress.org guidelines.
* Renamed plugin class file to `class-lifecocl-plugin.php`.
* Updated all database table names, options, capabilities, nonces, and CSS classes.