=== AI Student Verification ===
Contributors: bdsplugins
Tags: student discount, ai verification, forms, coupons, education, membership, ecommerce
Requires at least: 5.8
Tested up to: 6.6
Stable tag: 1.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

AI Student Verification (AISV) automatically verifies student IDs uploaded through forms and issues discount coupons instantly.

== Description ==

**AI Student Verification (AISV)** allows you to automatically verify student IDs uploaded through your forms (custom forms or WPForms) and issue discount coupons instantly.  

This prevents abuse of student discount offers, saves admin time, and increases conversions — students are far more likely to complete their purchase when they receive their coupon immediately instead of waiting for manual approval.

**Features:**
* Verify uploaded student IDs via AI (Gemini API).
* Works with custom forms or WPForms integration.
* Deliver preloaded coupons instantly after verification.
* Customizable email templates (success, failure, already verified).
* Admin logs of all verifications.
* Configurable verification modes (Loose / Strict).
* License key validation for secure use.

**Use cases:**
* SaaS platforms offering student discounts.
* Online courses and memberships.
* E-commerce shops offering student pricing.
* Any site offering reduced pricing for verified students.

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/ai-student-verification` directory, or install via WordPress dashboard.
2. Activate the plugin through the "Plugins" screen in WordPress.
3. Go to **AI Verification → Settings & License** and enter your license key.
4. Add coupon codes under **Coupon Codes.**
5. Configure email templates under **AI Verification → Email Templates.**
6. Integrate with your preferred form (custom form or WPForms).

= Documentation =
Full setup & usage guide: https://bdsplugins.com/documentation-ai-student-verification/

== Frequently Asked Questions ==

= How does the verification work? =
Student IDs uploaded through your form are sent to the Gemini API for AI-based verification. Based on the result, the student either receives a coupon or a failure notice.

= What is "Strict" vs "Loose" mode? =
* **Loose:** More lenient, accepts IDs with minor variations or lower AI confidence.  
* **Strict:** Requires higher confidence and exact matches.  

= Which tokens can I use in emails? =
Available placeholders:
* `{username}` – the student’s WordPress username
* `{email}` – the student’s email address
* `{coupon}` – the issued coupon code
* `{site_name}` – your website’s name
* `{reapply_limit_days}` – the number of days before re-application
* `{last_verified_date}` – date of last successful verification
* `{last_coupon}` – previously issued coupon

= Does it only work with WPForms? =
No. AISV works with **custom forms** as well as WPForms integration. Support for additional form builders is planned.

= Where are the logs stored? =
All verification attempts are logged under **AI Verification → Logs**. Logs are stored in the database table `{prefix}_aisv_logs`.

== Licensing ==

This plugin is licensed under the **GPLv2 or later**, just like WordPress itself.  
A valid AISV license key is required to access AI verification, updates, and support.

== Screenshots ==

1. Settings & License Page
2. Email Templates Page
3. Verification Logs

== Changelog ==

= 1.3 =
* Added styled admin pages with tooltips and improved layout.
* Added customizable email templates with available tags.
* Added support for custom forms (beyond WPForms).

= 1.2 =
* Added logs page.
* Integrated license key system.

= 1.1 =
* Added WPForms integration.
* Added coupon code handling.

= 1.0 =
* Initial release.

== Upgrade Notice ==

= 1.3 =
Improved admin UI, customizable email templates, and custom form support.
