=== Naimur Email OTP Verification for WooCommerce ===
Contributors: naimurrahmannahid
Donate link: https://buymeacoffee.com/naimurrahmannahid
Tags: woocommerce, otp, email verification, customer
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 2.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Short Description: Verify WooCommerce customer email addresses with a 6-digit OTP before account creation for secure and spam-free registrations.

== Description ==
**Naimur Email OTP Verification for WooCommerce** verifies customer email ownership using a One Time Password (OTP) before account creation. Optional Google reCAPTCHA, Cloudflare Turnstile, email logs, activity tracking, and a responsive OTP modal are included.

This plugin verifies users through a unique OTP sent to their email during:
- Login
- Registration

== Documentation ==

Full documentation for setup, usage, and customization is available here:  
👉 **https://naimurrahmannahid.com/naimur-otp-plugin/**

== Video Tutorial ==
[Youtube https://youtu.be/AehMWNLxkVk?si=seExgoLRqORq1R48]

### 🔥 Key Features
- Email-Based OTP Verification  
- Instant OTP Delivery  
- OTP for Login, Register & Checkout  
- Smart OTP Input UI with Paste Event  
- Custom Email Templates  
- Secure & Anti-Spam Protection  

### Additional Features
- OTP expiry control  
- Resend button with countdown  
- AJAX-based OTP submit  
- Google reCAPTCHA v2 & Cloudflare Turnstile support  
- Custom error/success messages  
- Full Name & Confirm Password fields for Registration  
- Modern, fully responsive UI override for default My Account page  
- Database-optimized activity logging (`wp_ceovw_logs`)  
- Translation-ready  
- Developer-friendly hooks  

== External services ==

This plugin can optionally integrate with Google reCAPTCHA and Cloudflare Turnstile to protect the WooCommerce login and registration forms from automated abuse and spam.

**Google reCAPTCHA:**
When reCAPTCHA is enabled in the plugin settings and you configure a site key and secret key, the following data is sent to Google:
* The reCAPTCHA response token generated in the browser
* The IP address of the user
* Additional browser and usage information collected by the reCAPTCHA widget

Service Provider:
* Google reCAPTCHA – Provided by Google LLC
* Terms of Service: https://www.google.com/recaptcha/terms/
* Privacy Policy: https://policies.google.com/privacy/

**Cloudflare Turnstile:**
When Turnstile is enabled, a token is generated to ensure the request is made by a human user. Similar to reCAPTCHA, IP and browser telemetry may be processed by Cloudflare to validate the session.

Service provider:
* Cloudflare Turnstile – provided by Cloudflare, Inc.
* Terms of Service: https://www.cloudflare.com/website-terms/
* Privacy Policy: https://www.cloudflare.com/privacypolicy/

== Source code ==

The JavaScript file `assets/js/main.js` is a compiled/optimized build used in production.

A human-readable source version of this script is bundled with the plugin under:

* `assets/src/js/main.js`

This file contains the original source code that can be viewed, studied and modified by developers.

== Screenshots ==
1. Settings
2. Email Template
3. Email Verification Logs
4. Template preview
5. Popup

This plugin is lightweight, fast, and works with any WooCommerce-compatible theme or builder.

== Frequently Asked Questions ==

= Does the plugin support custom email templates? =
Yes — you can fully customize the HTML email template including OTP placeholder, colors, subject, and branding.

= Can I enable OTP only for Login or only for Registration? =
Yes — each module can be enabled or disabled individually from the plugin settings.

= Does this plugin support SMTP? =
Yes — works with all SMTP plugins (WP Mail SMTP, FluentSMTP, Post SMTP, etc.)

= Is reCAPTCHA supported? =
Yes — Google reCAPTCHA v2 is supported to prevent bot-generated OTP requests.

= Is Cloudflare Turnstile supported? =
Yes — added in version 1.2.0 as an alternative modern captcha solution.

= Does it slow down the site? =
No — the plugin is lightweight and optimized for speed, including a custom database table for logs.

== Changelog ==

= 2.1.0 =
* Added: Advanced Device & OS Detection (Mobile, PC, Mac) for activity logging.
* Added: Enterprise-grade Real IP tracking (works behind Cloudflare/Proxies).
* Added: Performance-optimized database cleanup via WP Cron to keep logs clean and fast.
* Added: Enhanced security with brute-force protection (IP-based rate limiting).
* Tweak: Completely revamped AJAX engine for zero-buffering, smooth OTP verification.
* Tweak: Strict DOM Isolation for CSS to prevent theme/page builder conflicts.
* Fix: Resolved "An error occurred" AJAX issue by ensuring clean JSON responses.
* Fix: Fixed timezone discrepancies for OTP expiry logic.

= 1.2.0 =
* Added: Full Name & Confirm Password fields to the registration form.
* Added: Cloudflare Turnstile Captcha support alongside Google reCAPTCHA.
* Added: Custom database table (`wp_ceovw_logs`) for optimized activity tracking.
* Added: Smart OTP Paste event in the frontend modal.
* Tweak: Fully responsive, 100% full-width modern CSS design for all devices.
* Security: Implemented absolute sanitization and strict nonces across all AJAX calls.

= 1.1.5 =
* Text domain aligned with slug `naimur-email-otp-for-woocommerce`.
* Added nonce checks, escaping, sanitization and translators comments.
* reCAPTCHA mobile token capture improvements and safe debug logging.

== Upgrade Notice ==

= 2.1.0 =
Major security and performance update! Includes Real IP tracking, device detection, and enhanced anti-spam protection. Please deactivate and reactivate the plugin to initialize new database tables.

= 1.2.0 =
Revamped UI, added Cloudflare Turnstile, and optimized database tables.