=== WebGears AI Product Descriptions for WooCommerce ===
Contributors: webgears
Tags: woocommerce, ai, product descriptions, bulk content, seo
Requires at least: 6.0
Tested up to: 7.0
Stable tag: 3.3.2
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Generate SEO-optimized WooCommerce product descriptions using AI. Supports OpenAI and Google Gemini — including a free Gemini API tier.

== Description ==

Generate hundreds of WooCommerce product and category descriptions in minutes — directly inside your WordPress dashboard.

No copywriting. No repetitive work. No switching between tools.

Perfect for stores with large catalogs, dropshipping businesses, and anyone who wants fast, SEO-ready product content.

= ⚡ Why this plugin? =

**❇️❇️❇️ Free to start — Google Gemini supported ❇️❇️❇️seo-op**
Now supports both OpenAI (ChatGPT) and Google Gemini. Gemini offers a free API tier — no credit card required to get started.

**⚡ Bulk generation in seconds**
Select multiple products or categories and generate descriptions in one click — no manual writing needed.

**🧠 Smart AI output**
Uses your product data, categories, and custom prompts to create structured, relevant descriptions.

**🔍 SEO-ready content**
Clean HTML output with headings, lists, and keyword-focused structure — ready to publish.

**🔄 Native WooCommerce integration**
Works directly inside WooCommerce bulk actions — no external tools or dashboards.

**🤖 Automation with Pro**
Generate and publish descriptions automatically without manual review.

**💸 Pay only for what you use**
Connect your own API key — no hidden fees, no artificial limits.

= 🎯 Who is this for? =

* WooCommerce stores with large product catalogs
* Dropshipping businesses adding products daily
* Store owners who want faster SEO content
* Agencies managing multiple WooCommerce sites

= ⚙️ How it works =

1. Choose your AI provider: OpenAI or Google Gemini (free tier available)
2. Enter your API key
3. Customize prompts (optional)
4. Select products or categories
5. Click "Generate AI Descriptions" — done

= 🔥 Pro Features =

With the [WebGears AI Product Descriptions Pro add-on](https://webgears.net/en/ai-bulk-product-and-description-tool/), you can fully automate your workflow:

* Auto-generate and save descriptions without preview
* Include existing content for better AI context
* Append new content instead of replacing
* AI-generated image keywords
* Hybrid image mode (product images + stock fallback)
* SEO templates for ALT / Title / Caption
* Bulk restore original content
* AI preview directly in product list

= 🧩 Flexible Prompt System =

Customize how the AI writes using dynamic placeholders:

* `{title}` – Product or category name
* `{price}` – Product price
* `{sku}` – Product SKU
* `{categories}` – Product categories
* `{attributes}` – Product attributes

== External Services ==

This plugin connects to third-party AI and image APIs. Connections are made only when the user explicitly triggers content generation.

= AI Providers =

**OpenAI** — [Terms](https://openai.com/policies/terms-of-use) · [Privacy](https://openai.com/policies/privacy-policy)
**Google Gemini** — [Terms](https://ai.google.dev/gemini-api/terms) · [Privacy](https://policies.google.com/privacy)

Data sent: product title, price, SKU, categories, attributes, and prompt text.

= Image Sources (optional) =

**Unsplash** — [Terms](https://unsplash.com/terms) · [Privacy](https://unsplash.com/privacy)
**Pexels** — [Terms](https://www.pexels.com/terms-of-service/) · [Privacy](https://www.pexels.com/privacy/)
**Freepik** — [Terms](https://www.freepik.com/legal/terms-of-use) · [Privacy](https://www.freepik.com/legal/privacy)

Data sent: image search keywords derived from product/category titles. Used only when image integration is enabled.

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/`
2. Activate through the 'Plugins' menu
3. Go to WooCommerce > AI Descriptions
4. Choose your AI provider and enter your API key
5. Start generating descriptions

== Frequently Asked Questions ==

= Do I need a paid API key? =

Not necessarily. Google Gemini offers a free API tier — get your key at [aistudio.google.com](https://aistudio.google.com). OpenAI is also supported and charges based on usage.

= How much does it cost to generate descriptions? =

With Gemini's free tier — nothing. With OpenAI, costs depend on the model; typically $1–5 per 100 descriptions.

= Will it work with my language? =

Yes. Write your prompts in any language and the AI will respond in that language.

= What happens to my original descriptions? =

Original content is automatically backed up before generation and can be restored anytime.

= Can I use my own product images? =

Yes. Choose "Product/Category Gallery" as the image source to use existing images. Hybrid mode combines gallery images with stock photos (Pro).

= Is it compatible with page builders? =

Yes. Generated content is standard HTML, compatible with Elementor, Divi, and all themes.

== Screenshots ==

1. Settings page — Overview tab with feature grid
2. AI Settings — provider selection, API key, and prompt configuration
3. Images tab — source strategy and display options
4. Bulk generation modal with progress tracking

== Changelog ==

= 3.3.2 =
* Fix: Admin notice for v3.3.0 bug now shows on all versions until dismissed (not only 3.3.1).
* Improvement: Plugin zip now includes all required core files for correct WordPress.org distribution.

= 3.3.1 =
* Fix: Plugin no longer causes fatal error / white screen if a file is missing after install. Shows admin notice with reinstall link instead.
* Fix: Defensive file loading in class-loader.php with file_exists() checks for all dependencies.

= 3.3.0 =
* Architecture: Bulk AI fix.
* Free plugin: Removed unnecessary modal views, css, and  JavaScript.
* Pro add-on v2.3.0 required for Pro version.

= 3.2.1 =
* Gemini: Fixed temperature encoding on servers with non-English locale (e.g. Bulgarian) where PHP could produce "0,7" instead of "0.7" in the JSON request body, causing API errors. Now uses locale-safe number_format with explicit "." separator.
* Gemini: Added automatic retry (up to 2 times) when the API returns 503 "high demand" error, with 3s/6s backoff.
* Gemini: Added 3 new models — gemini-3.5-flash (ultra-fast, low cost), gemini-3.1-pro-preview (deep reasoning), gemini-3.1-flash-lite (ultra-budget). Models now grouped by generation in the dropdown.

= 3.2.0 =
* Added Google Gemini support: choose between OpenAI (ChatGPT) and Google Gemini as your AI provider. New "AI Provider" dropdown at the top of the AI Settings tab. Both providers use the same prompt templates.
* New Gemini models available: gemini-2.5-pro, gemini-2.5-flash, gemini-2.0-flash (default), gemini-1.5-pro, gemini-1.5-flash.
* AI keyword translation (title/auto modes) now uses whichever provider is selected.
* GPT Settings tab renamed to AI Settings.

= 3.1.1 =
* Settings UI: Optimization.
* Images tab: Added "Image Selection Mode" setting (Random / Sequential).

= 3.1.0 =
* Stripped trailing AI commentary/markdown fences from generated content (clean_ai_response)
* Images tab: Custom Keywords row now visible.
* GPT Settings: Added o3, o3-mini, o1, o1-mini to the Reasoning Models optgroup
* Updated Tested up to: 7.0

= 2.0.0 =
* Complete rewrite with bulk generation, multi-source images, and tabbed settings

== Upgrade Notice ==

= 3.2.1 =
Google Gemini is now supported — including a free API tier. No OpenAI account needed to get started.
