# Changelog

All notable changes to ID Payment Link Generator will be documented in this file.

## 2.0.1

- Added PHPCS inline annotations for WordPress Plugin Check compliance.
- Refactored custom table queries to use local `$table` variable for proper `$wpdb->prepare()` compatibility.
- Changed `date()` to `gmdate()` in CSV export for WordPress coding standards.
- Added nonce verification annotations for WP_List_Table and AJAX handlers where nonces are verified upstream.

## 2.0.0

- **Pro Feature: Customer Management** — Save, edit, search, and delete customers. Quick-select on generator page auto-fills client fields. Auto-save new customers on email send.
- **Pro Feature: Payment Link Log** — Every sent email is logged with status, amount, and recipient. Filter by status and date range. Resend emails with one click. Export log to CSV.
- **Pro Feature: Email Templates** — Create and manage multiple email templates with the WordPress editor. Set a default template. Select template when sending from the generator page.
- Added Freemius paid plan integration with license management and account page.
- Free users see Pro menu items with "Pro" badge leading to upgrade teaser pages.
- Created custom database tables (`idplg_customers`, `idplg_log`, `idplg_email_templates`) via `dbDelta()`.
- Default email template is seeded into the templates table on activation.
- Added `includes/` directory with modular Pro class files loaded only when licensed.
- Added filter and action hooks for Pro integration: `idplg_email_subject`, `idplg_email_body`, `idplg_after_email_sent`, `idplg_generator_before_buttons`, `idplg_admin_page_hooks`, `idplg_localize_data`.
- Added Pro CSS (`admin-pro.css`) and JS (`admin-pro.js`) assets with minified versions.
- Updated uninstall handler to drop Pro tables and clean up `idplg_db_version` option.

## 1.4.0

- Added logo upload field in Email Configuration settings.
- Added professional invoice-style default email template with amount box, Pay Now button, and footer.
- Added `{logo}` merge tag for embedding business logo in emails.
- Added `{site_name}` merge tag for including the WordPress site name in emails.
- Default email template is pre-loaded in the editor for new installs.

## 1.3.0

- Added Freemius SDK integration.
- Internationalized default email subject and body strings.
- Updated uninstall handler with Freemius cleanup.
- Updated tested up to WordPress 6.9.

## 1.2.0

- Added email sending with customizable templates and merge tag support.
- Added configurable form field parameter mapping for flexible payment form integration.
- Added email configuration settings (from name, from email, subject, body template).
- Added WordPress rich editor for email body composition.
- Renamed all option prefixes from id_payment_* to idplg_* to prevent conflicts.
- Renamed all CSS classes from id-* to idplg-* to prevent conflicts.
- Added minified CSS and JS assets with SCRIPT_DEBUG support.
- Added LICENSE.txt, uninstall.php, and .pot translation template.
- Added activation checks for PHP 7.2+ and WordPress 5.0+.
- Added load_plugin_textdomain() for translation support.
- Extracted inline CSS and JS to separate asset files.

## 1.1.0

- Added separate first name and last name fields.
- Added email field for client contact information.

## 1.0.0

- Initial release.
- Admin page for generating payment links with client name and amount.
- Settings page to select payment form page.
- One-click copy to clipboard.
- Administrator-only access.
