=== Essiow — AI SEO Suite for WooCommerce ===
Contributors: boni58
Tags: woocommerce, seo, ai, product-descriptions, chatbot
Requires at least: 5.8
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.1.8
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Optimize your WooCommerce store SEO with AI. Auto-generate product descriptions, category pages, blog articles, and add an AI sales chatbot.

== Description ==

**Essiow** is the all-in-one AI-powered SEO suite for WooCommerce stores. It connects to the [Essiow platform](https://essiow.com) to automatically generate and optimize your store content using artificial intelligence.

= 5 Modules Included =

**1. Product SEO Optimization**
Automatically generate SEO-optimized product descriptions, meta titles, meta descriptions, focus keywords, and image alt text. Supports Yoast SEO, Rank Math, and All in One SEO. Includes JSON-LD schema generation for rich snippets.

**2. Category SEO Optimization**
Transform your bare category pages into rich content pages with short descriptions, long-form SEO content (1,500-2,500 words), FAQ sections, comparison tables, and internal linking. Automatically fixes corrupted category names.

**3. Blog Article Generator**
Generate long-form SEO blog articles (1,500-5,000 words) that naturally integrate your WooCommerce products. Includes internal linking, external authority links, FAQ sections, and automatic featured images.

**4. AI Sales Agent**
Add an intelligent chatbot to your store that searches your products in real-time, answers customer questions, handles price objections, creates promotional codes, and guides visitors to purchase.

**5. WooCommerce Scraper** (via Essiow dashboard)
Analyze competitor WooCommerce stores. Extract products, categories, prices, and descriptions with CSV export.

= Key Features =

* 8 languages supported: English, French, Spanish, German, Italian, Portuguese, Dutch, Arabic
* 4 writing tones: Professional, Casual, Luxury, Technical
* 3 content lengths: Short, Medium, Long
* Bulk optimization with progress tracking
* Backup and restore original content
* Compatible with Yoast SEO, Rank Math, and All in One SEO
* JSON-LD Product schema for rich snippets
* GDPR compliant (auto-delete chat data after 90 days)
* WooCommerce HPOS compatible

= How It Works =

1. Create a free account on [essiow.com](https://essiow.com) and get 10 free credits
2. Install this plugin and enter your API key
3. Start optimizing your products, categories, and blog content
4. Watch your search rankings improve

= Credit System =

* 1 credit per product optimization
* 1 credit per category optimization
* 3 credits per blog article
* Credits never expire (except free credits: 30 days)

= External Service =

This plugin connects to the Essiow API at `https://essiow.com/api/v1` to process AI content generation. Your product data (names, descriptions, prices, categories) is sent to the Essiow servers where it is processed using OpenAI's GPT models. No data is stored on Essiow servers beyond what is needed to track your credit usage.

* [Essiow Terms of Service](https://essiow.com/terms)
* [Essiow Privacy Policy](https://essiow.com/privacy)

== Installation ==

1. Upload the `essiow` folder to `/wp-content/plugins/`
2. Activate the plugin through the 'Plugins' menu in WordPress
3. Go to **Essiow > Settings** and enter your API key from [essiow.com](https://essiow.com)
4. Click "Test Connection" to verify
5. Start optimizing from **Essiow > Products** or **Essiow > Categories**

== Frequently Asked Questions ==

= Do I need an Essiow account? =
Yes. Create a free account at [essiow.com](https://essiow.com) to get your API key and 10 free credits.

= Do I need technical skills? =
No. If you can install a WordPress plugin, you can use Essiow. Everything is done in a few clicks.

= Which SEO plugins are supported? =
Essiow works with Yoast SEO, Rank Math, and All in One SEO. It automatically detects your plugin and updates the correct fields.

= Is my data safe? =
Your product data is sent to Essiow servers only during optimization. It is processed in real-time and not stored. Chat conversations are auto-deleted after 90 days per GDPR requirements.

= Do credits expire? =
Purchased credits never expire. The 10 free credits expire after 30 days.

= Can I try before buying? =
Yes. Create a free account and get 10 credits to test all features. No credit card required.

== Screenshots ==

1. Dashboard with connection status and credit balance
2. Product optimization with SEO score and bulk actions
3. Category optimization with rich content preview
4. Blog article generator with async processing
5. AI Sales Agent configuration
6. Settings page with API connection

== Changelog ==

= 1.1.8 =
* Fix: blog article generation no longer hangs with `admin-ajax.php` ERR_TIMED_OUT on shared / mod_security hosts. Background dispatch now uses a 3-tier strategy: fastcgi_finish_request() (instant, PHP-FPM hosts), HTTP loopback (existing), and WP-Cron fallback (always works). The first available wins; redundant workers are idempotent (transient state guards against double-processing).
* Improve: client-side polling extended from 5 min to 10 min so 5000-word articles have time to complete on slower OpenAI responses.
* Improve: HTTP loopback now forwards cookies for hosts that require an authenticated session even on nopriv handlers.

= 1.1.7 =
* Fix: API key now persists correctly across saves (no longer "disappears" after Test Connection)
* Fix: rare "Invalid API key" error caused by encryption format collision (random IV containing the legacy "::" separator) — new "v2:" format is collision-proof, legacy "v1" payloads remain readable
* Add: static cache on get_api_key() prevents redundant decryptions and migration race conditions within a single request
* Add: 5-minute transient cache on license verification, 60-second transient on credit balance — fewer redundant API calls per admin page load
* Add: automatic retry with backoff (1s, 3s) on network errors and 5xx responses (4xx auth/validation are not retried)
* Add: auto-purge of essiow_last_errors entries older than 7 days
* Settings UI: API key field now shows the masked saved key as placeholder, leave empty to keep the saved key
* Improve: uninstall.php now lists encrypted-key options explicitly

= 1.1.6 =
* Fix: blog article generation now uses asynchronous task processing to avoid "Network error" on hosts with short proxy or PHP-FPM timeouts
* Improve: background generation worker keeps running on long AI calls (ignore_user_abort, extended time limit, session lock released)

= 1.0.0 =
* Initial release
* Product SEO optimization with descriptions, meta, alt text, schema
* Category SEO optimization with rich content and FAQ
* Blog article generator with product integration
* AI Sales Agent with chatbot widget
* 8 languages, 4 tones, 3 content lengths
* Bulk optimization with progress tracking
* Yoast SEO, Rank Math, All in One SEO support
* GDPR compliant

== Upgrade Notice ==

= 1.1.6 =
Fixes a "Network error" that could appear when generating blog articles on hosts with short HTTP proxy timeouts. Recommended update.

= 1.0.0 =
Initial release of Essiow AI SEO Suite for WooCommerce.
