=== Omorfos AI Virtual Try-On ===
Contributors: egurdal
Tags: virtual try-on, woocommerce, ai, virtual fitting room, fashion technology
Requires at least: 5.8
Tested up to: 7.0
Stable tag: 1.2.1
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

AI-powered virtual try-on for WooCommerce. Let your customers see how clothes look on realistic AI-generated models before purchasing.

== Description ==

**Omorfos AI Virtual Try-On** is an AI-powered virtual fitting room plugin for WooCommerce stores. It allows your customers to visualize how clothing items look on realistic AI models directly from their shopping cart — increasing conversion rates and reducing returns.

### 🚀 Key Features

* **AI-Powered Virtual Try-On** — Uses the Omorfos Neural Engine (powered by Google Vertex AI) to generate photorealistic try-on images
* **Multiple AI Models** — Support for adult male/female, teen, child, and baby models
* **Advanced Appearance Customization** — Customers can select skin tone, ethnicity, and eye color for personalized results
* **Multi-Product Try-On** — Try on multiple products at once from the shopping cart
* **Gallery Image Selection** — Customers choose which product photo to use for the try-on
* **Credit-Based System** — Pay only for what you use with a flexible credit system
* **Customizable Texts** — Translate or customize every user-facing text in the plugin
* **Access Control** — Restrict try-on to logged-in users or allow everyone including guests
* **Usage Quotas** — Set daily and lifetime usage limits per user or IP
* **HMAC Security** — Enterprise-grade request signing for secure API communication
* **Caching** — Intelligent response caching to save credits on repeated requests
* **WooCommerce Native** — Seamlessly integrates with your WooCommerce cart page

### 🎯 Why Omorfos AI?

* **Increase Conversions** — Customers who visualize products are 2.5x more likely to buy
* **Reduce Returns** — Realistic previews help customers make better purchasing decisions
* **Easy Setup** — Install, enter your API credentials, and you're live in minutes
* **No Performance Impact** — All AI processing happens on our cloud infrastructure
* **Multi-Language Ready** — Fully customizable texts for any language

### 🔧 How It Works

1. Install and activate the plugin
2. Sign up at [omorfos.ai](https://omorfos.ai) and get your API credentials
3. Enter your Site Token and Site Secret in the plugin settings
4. Your customers will see a "Try On With AI" button on the cart page
5. They select products, choose a model, and generate a virtual try-on image

### 📊 Dashboard & Credits

Manage your account, purchase credits, and view usage analytics from the [Omorfos AI Dashboard](https://omorfos.ai/dashboard).

== Installation ==

1. Upload the `virtual-try-on` folder to the `/wp-content/plugins/` directory
2. Activate the plugin through the 'Plugins' menu in WordPress
3. Go to **Omorfos AI** in the WordPress admin sidebar
4. Enter your Site Token and Site Secret (get them from [omorfos.ai](https://omorfos.ai))
5. Click "Test Backend Connection" to verify your setup
6. Customize models, appearance options, and texts as needed

== External services ==

This plugin connects to the Omorfos AI API (https://omorfos.ai), a paid third-party service operated by Omorfos AI, to generate the virtual try-on images. The plugin cannot function without this service; an account and API credentials from omorfos.ai are required.

The plugin sends data to the Omorfos AI API in the following cases:

* **When the store administrator saves settings or clicks "Test Backend Connection" / "Refresh" in the plugin settings page:** the configured Site Token is sent to https://omorfos.ai/api/v1/auth/verify and https://omorfos.ai/api/v1/credits to verify the credentials and retrieve the remaining credit balance.
* **When a shopper clicks the try-on "Generate" button:** the selected product image URLs, the chosen AI model preset, the optional appearance selections (skin tone, ethnicity, eye color) and an anonymous user identifier (the WordPress user ID for logged-in users, or the visitor's IP address for guests, used solely for quota enforcement) are sent to https://omorfos.ai/api/v1/try-on. The generated image is returned to the browser and is not permanently stored by the service.

No other personal data is collected or transmitted. All requests are signed with HMAC-SHA256 using your Site Secret, which never leaves your server.

This service is provided by Omorfos AI: [terms of service](https://omorfos.ai/terms-of-sale), [privacy policy](https://omorfos.ai/privacy-policy).

== Frequently Asked Questions ==

= Where do I get API credentials? =

Sign up at [omorfos.ai](https://omorfos.ai) to create an account and get your Site Token and Site Secret.

= How does the credit system work? =

Each virtual try-on generation consumes one credit. You can purchase credit packages from the [Omorfos AI Dashboard](https://omorfos.ai/dashboard/credits). Cached results don't consume additional credits.

= Which product types are supported? =

The plugin works with clothing and fashion products — tops, bottoms, dresses, outerwear, and more. It supports both simple and variable WooCommerce products.

= Can I restrict who can use the try-on feature? =

Yes! In the Access & Quotas tab, you can limit try-on to logged-in users only and set daily/lifetime usage limits per user or IP address.

= Is the plugin GDPR compliant? =

Yes. The plugin doesn't store any personal customer data. Try-on images are generated on-demand and not permanently stored on our servers.

= Does it work with variable products? =

Yes! The plugin fully supports WooCommerce variable products, including variation-specific images and parent product galleries.

== Screenshots ==

1. Virtual try-on modal with product selection and AI model options
2. Plugin settings page with branded Omorfos AI header
3. Access control and quota settings
4. Model selection and advanced appearance options
5. Text customization for multi-language support

== Changelog ==

= 1.2.1 =
* Security: sanitized all request inputs (including guest IP identifier) and escaped all translated outputs
* Changed: admin settings JavaScript is now enqueued via wp_enqueue_script instead of inline output
* Changed: all internal option names, AJAX actions and identifiers now use the unique `omoraivi_` prefix
* Changed: SSL certificate verification is now always enabled for API requests
* Removed: "Powered by Omorfos AI" link from the customer-facing try-on modal
* Added: "External services" disclosure section in the readme

= 1.2.0 =
* **New:** Rebranded as "Omorfos AI Virtual Try-On"
* **New:** Branded admin settings header with quick links to Dashboard, Credits, Docs, and Support
* **New:** Plugin action links (Settings, Get Credits) in WordPress plugins list
* **New:** Plugin row meta links (Documentation, Support) in plugins list
* **New:** "Powered by Omorfos AI" badge in the try-on modal footer
* **New:** Full readme.txt for WordPress.org compatibility
* **Improved:** Plugin header with proper Plugin URI, Author URI, and WordPress/WooCommerce compatibility tags

= 1.1.1 =
* Advanced appearance options (skin tone, ethnicity, eye color)
* Customizable user-facing texts
* Gallery image selection for products
* Local quota enforcement

= 1.1.0 =
* Multi-model support (adult, teen, child, baby)
* Access control (everyone / logged-in only)
* Credit balance display in admin
* Error logging and admin notifications

= 1.0.0 =
* Initial release
* Basic virtual try-on generation
* WooCommerce cart integration
* HMAC signature security

== Upgrade Notice ==

= 1.2.0 =
Rebranded with Omorfos AI identity. Includes quick links to dashboard, documentation, and support directly from plugin settings.
