=== DigitalCraft Content Generator for WooCommerce ===
Contributors: baltasmazgas
Tags: woocommerce, product description, ai, openai, gemini
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 0.1.3
Requires Plugins: woocommerce
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Generate a WooCommerce product description and a matching product photo with OpenAI, Google Gemini, or Anthropic Claude — using your own API key.

== Description ==

DigitalCraft Content Generator for WooCommerce adds an "AI Content Generator" box to the WooCommerce product edit screen. From the product's existing description, it uses an AI provider of your choice (OpenAI, Google Gemini, or Anthropic Claude for text; OpenAI or Google Gemini for images) to write a full product description and generate a matching product photo. You choose whether to apply the new description, the new image, or both — nothing is written to the product until you click Apply.

**Features**

* Full choice of AI provider: OpenAI, Google Gemini, or Anthropic Claude for text; OpenAI or Google Gemini for images.
* Generates a complete product description from the product's existing text (or from just the product name, if there's nothing yet), with an optional short feature-list of key selling points.
* Generates a matching product photo, with an optional style description (e.g. "white background, top-down flat lay, natural lighting").
* Multiple image candidates per generation (configurable per provider) — pick the one you like from a lightbox preview instead of committing to a single result.
* One-click "also generate an image?" follow-up after a description-only run.
* Review everything before it touches the product: the generated description is editable, and you separately choose whether to apply the description, the image, or both.
* Bring your own API key — you pay your AI provider directly; this plugin doesn't add any markup or middleman billing.
* Fully translatable — every string is ready for community translation via translate.wordpress.org.

This Lite version handles one product at a time. For bulk-filling an entire catalog in the background, AI-suggested categories & tags, an "AI-generated" disclosure note/watermark, and usage statistics, see the Pro version below.

= Requirements =

* WordPress with WooCommerce active.
* An API key for at least one supported AI provider (OpenAI, Google Gemini, or Anthropic Claude), with access to a chat model, and — if you want image generation — an image model from a provider that supports it (OpenAI or Google Gemini). Each provider requires its own paid account; this plugin does not provide any AI service itself.

== Upgrade to Pro ==

The full [AI Description Image Generator](https://bmdigitalcraft.com/ai/) adds:

* **Bulk-fill your entire catalog** — select hundreds of products, run one action, and only genuinely missing content gets filled in (existing descriptions/images are never overwritten). Runs in the background with a live progress toast, cancel/retry controls, and a cost estimate shown before anything runs.
* **AI-suggested categories & tags**, reviewable as checkable chips before applying.
* **AI content disclosure** — an optional frontend note and an "AI-GENERATED" image label for transparency with shoppers.
* **Reference-photo upload** — attach a real photo of the product so the AI matches its actual appearance in the generated image.
* **Usage statistics** — track requests, tokens, and images generated per provider.

== External services ==

This plugin connects your site directly to the AI provider(s) you configure, to generate content on your behalf.

**What is sent, and when:** when you click "Generate" on a product, the plugin sends that product's name and existing description text to the AI provider(s) currently selected in Settings, and requests a generated description and/or image in return. This only happens when you click Generate — never automatically or in the background.

**Which services:**

* [OpenAI](https://openai.com/privacy/) — used for text and/or image generation if selected as a provider. [Terms of use](https://openai.com/policies/row-terms-of-use/).
* [Google Gemini](https://policies.google.com/privacy) — used for text and/or image generation if selected as a provider. [Terms of service](https://ai.google.dev/gemini-api/terms).
* [Anthropic Claude](https://www.anthropic.com/legal/privacy) — used for text generation if selected as a provider. [Terms of service](https://www.anthropic.com/legal/consumer-terms).

Each provider is billed directly by that provider using the API key you supply; this plugin does not proxy, store, or resell access to any of them. API keys are only ever used in server-side requests — never sent to the browser or exposed in page source.

== Installation ==

1. In wp-admin, go to **Plugins > Add New Plugin** and search for "DigitalCraft Content Generator for WooCommerce", or upload the zip via **Plugins > Add New Plugin > Upload Plugin**.
2. Click **Activate**.
3. Go to **WooCommerce > AI Content Generator** to add your API key(s) and choose your providers.
4. Open any product and use the **AI Content Generator** box to generate a description and/or image.

== Frequently Asked Questions ==

= Do I need an API key? =

Yes. This plugin doesn't include any AI service of its own — you supply your own API key for whichever provider(s) you choose (OpenAI, Google Gemini, and/or Anthropic Claude), and that provider bills you directly according to their own pricing.

= Does this overwrite my existing product content? =

No. Nothing is written to a product until you review the result and explicitly check "Update description" and/or "Update image", then click "Apply to product".

= Can I generate content for many products at once? =

The Lite version handles one product at a time. Bulk-filling an entire catalog in the background is available in the [Pro version](https://bmdigitalcraft.com/ai/).

= Is my API key stored securely? =

It's stored in the WordPress database (or, if you prefer, defined as a constant in `wp-config.php`, which takes precedence). It's only ever used in server-side requests to the AI provider — never exposed to the browser or logged in plaintext.

== Screenshots ==

1. Reviewing a generated description (with feature list) and image candidates on the product edit screen, before applying them.
2. The AI providers settings screen — choose your text and image provider, add your API key, and configure models.

== Changelog ==

= 0.1.3 =
* Changed: plugin renamed to DigitalCraft Content Generator for WooCommerce (was AI Description Image Generator Lite).
* Fixed: settings and user-guide screens now enqueue their CSS/JS via `wp_enqueue_style()`/`wp_enqueue_script()` instead of inline `<style>`/`<script>` tags.
* Fixed: removed an unused `wp-admin/includes/media.php` require (no function from it was actually called).
* Removed: bundled `.po`/`.mo`/`.pot` translation files — translations are now delivered entirely through translate.wordpress.org.

= 0.1.2 =
* Changed: default Google image model is now `gemini-3.1-flash-image` (was `gemini-2.5-flash-image`). As a side effect, the default Image size (1K) now actually takes effect — Gemini's imageSize/aspectRatio options are only honored by 3.x+ models, so they were previously silently ignored against the old default.

= 0.1.1 =
* Fixed: Plugin Check warnings — removed the redundant `load_plugin_textdomain()` call (WordPress.org loads hosted plugins' translations automatically), and annotated a handful of false-positive nonce/sanitization/discouraged-function warnings that PHPCS can't resolve across method calls (nonce verification happens in a shared `verify_request()` helper; the base64 image payload is validated downstream via strict decode + image-type checks rather than a text sanitizer).

= 0.1.0 =
* Initial release.

== Upgrade Notice ==

= 0.1.3 =
Plugin renamed to DigitalCraft Content Generator for WooCommerce; addresses WordPress.org review feedback (asset enqueuing, bundled translation files, core file loading).

= 0.1.2 =
Default Google image model updated to gemini-3.1-flash-image.

= 0.1.1 =
Fixes automated Plugin Check warnings; no functional changes.

= 0.1.0 =
Initial release.
