=== CataSync for WooCommerce ===
Contributors: dsidesign
Tags: woocommerce, ai, ean, seo, product-descriptions
Requires at least: 6.2
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 2.1.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Automatically generate WooCommerce product descriptions, titles, images, and SEO fields from EAN/barcode codes using AI.

== Description ==

**CataSync for WooCommerce** automatically generates complete, SEO-optimized product content from EAN/GTIN/barcode codes using AI. Connect your WooCommerce store to the [CataSync](https://catasync.com) platform and transform empty or incomplete product listings into rich, ready-to-sell pages — in bulk.

Perfect for **dropshipping stores**, **wholesale catalogs**, and any WooCommerce shop that imports products from supplier feeds with missing or poor-quality descriptions.

= The Problem =

You import hundreds or thousands of products from your supplier. They arrive with a barcode, maybe a generic title, and nothing else: no description, no images, no SEO. Writing product content manually takes forever.

= The Solution =

CataSync reads the EAN/GTIN barcode from each product, looks it up across multiple international product databases, and uses AI to generate professional, unique product content that is written directly into your WooCommerce fields.

= What CataSync generates =

* **Product title** — clean, keyword-rich, ready to publish
* **Short description** — concise selling point for category pages
* **Long description** — detailed, SEO-optimized content (SEO Complete mode)
* **Featured image** — downloaded from verified sources and saved to your Media Library
* **Product attributes** — extracted from product data (weight, dimensions, materials, etc.)
* **Yoast SEO / RankMath fields** — meta title, meta description, and focus keyword filled automatically
* **SEO-friendly URL slug** — generated from the optimized product title

= Generation Modes =

* **Standard** — title, short description, image
* **SEO Base** — everything in Standard + meta title, meta description, URL slug
* **SEO Complete** — everything in SEO Base + long description, focus keyword, product attributes

The available modes depend on your [CataSync subscription plan](https://catasync.com/prezzi).

= Key Features =

* **Bulk generation** — select multiple products and generate them all with a progress bar, ETA, and pause/resume
* **Automated profiles** — schedule generation hourly, daily, or weekly, or trigger it in real-time when a product is saved
* **Single product generation** — generate from the WooCommerce product edit screen with one click
* **Dashboard** — monitor credit usage, plan info, billing overview, and generation statistics
* **Products list** — dedicated admin page with CataSync status column, search, sorting, and filter by status
* **Activity log** — full history of every API call with date, product, EAN, mode, status, cost, and response time
* **Smart field control** — configure each field independently: skip, fill only if empty, or always overwrite
* **Multi-source EAN lookup** — searches UPCitemdb, Barcode Spider, EAN-search, Open Food Facts, Open Beauty Facts, Google Books, and more
* **Image validation** — AI-powered photo validator filters out irrelevant or low-quality images
* **8 AI writing tones** — professional, friendly, technical, luxury, minimal, persuasive, informative, creative
* **Compatible with Yoast SEO and RankMath**
* **Compatible with WooCommerce HPOS** (High-Performance Order Storage)
* **Multisite compatible**
* **Translation ready** (i18n)

= Who is CataSync for? =

* **Dropshipping stores** importing thousands of products from suppliers with no descriptions
* **Wholesale catalogs** that need professional product pages fast
* **Marketplace sellers** who manage large WooCommerce inventories
* **Agencies** managing multiple ecommerce clients who need product content at scale
* **Any WooCommerce store** with products that have EAN/GTIN barcodes and need better content

= Requirements =

* A [CataSync account](https://catasync.com) — free trial with 5 credits included
* Your CataSync API key (from your dashboard under API & Integrations)

= Support =

For plugin issues or questions about your plan: **supporto@catasync.com**

Want to upgrade your plan? Visit [catasync.com/prezzi](https://catasync.com/prezzi)

= External Services =

This plugin connects to the CataSync API (a third-party SaaS service) to generate product content from EAN/barcode codes. **It is required for the plugin to function.**

**What data is sent and when:**

* When you click "Generate" on a product (or a profile runs automatically), the plugin sends the following to the CataSync API endpoint at `https://app.catasync.com/api/v1/generate`:
  * Product EAN/barcode code
  * Product name (used as fallback when EAN lookup fails)
  * Your API key (for authentication)
  * The selected generation mode (e.g. `seo_base`, `full_product`)
* When you validate your API key from the settings, the plugin sends your API key to `https://app.catasync.com/api/v1/account` to retrieve your plan information.
* No customer data, order data, or personally identifiable information is ever transmitted.

**Terms and Privacy:**

* CataSync Terms of Service: [https://catasync.com/termini](https://catasync.com/termini)
* CataSync Privacy Policy: [https://catasync.com/privacy](https://catasync.com/privacy)

By using this plugin you agree to the CataSync Terms of Service and Privacy Policy.

== Installation ==

1. Upload the `catasync-for-woocommerce` folder to `/wp-content/plugins/` or install directly from the WordPress plugin directory
2. Activate the plugin from **Plugins > Installed Plugins**
3. Go to **CataSync > Settings** in your WordPress admin
4. Enter your CataSync API key and click **Validate key**
5. Choose your default generation mode
6. Go to **CataSync > Products** and start generating!

Need an API key? [Register for free](https://catasync.com) — you get 5 credits to try it out.

== Frequently Asked Questions ==

= Do I need a CataSync account? =

Yes. CataSync is a SaaS platform that handles the EAN lookup, AI content generation, and image sourcing. You need an account and API key to use this plugin. Visit [catasync.com](https://catasync.com) to register — the free trial includes 5 credits so you can test it before subscribing.

= How does it work with dropshipping products? =

Most dropshipping suppliers provide product feeds with EAN/GTIN barcodes but minimal descriptions. CataSync reads those barcodes, looks up the real product data from international databases, and generates complete product pages with AI. You can process hundreds of products in bulk with a few clicks.

= Which EAN/barcode fields are supported? =

The plugin reads EAN from these WooCommerce meta keys (in priority order): `_global_unique_id` (WooCommerce 9.2+ native GTIN), `_ean`, `_gtin`, `_barcode`, `_ean_code`, `_product_gtin`, `_wc_gtin`, `_wpm_gtin_code`. If none are found, it falls back to the SKU field if it contains a numeric barcode (6-14 digits). This covers all major EAN/GTIN plugins and import tools.

= Will existing product data be overwritten? =

You have full control. Each field (title, short description, long description, image, attributes, SEO fields) can be configured independently to: skip, fill only if empty, or always overwrite. By default, existing titles are preserved and descriptions are updated.

= Is it compatible with Yoast SEO and RankMath? =

Yes. In SEO Base and SEO Complete modes, the plugin automatically writes to Yoast SEO fields (`_yoast_wpseo_title`, `_yoast_wpseo_metadesc`, `_yoast_wpseo_focuskw`) and RankMath fields. Your products get proper meta titles, meta descriptions, and focus keywords without any manual work.

= Can I generate descriptions for all products at once? =

Yes. From the CataSync Products page, select the products you want (or use "Select all"), choose the generation mode, and click "Generate selected". The plugin processes them sequentially with a progress bar showing ETA and allowing pause/resume. You can also set up automated profiles to generate new products on a schedule.

= What happens if a product is not found by its EAN? =

The product is marked as "Not found" in the CataSync status column. No credits are consumed for unfound products. You can enter product data manually or try again later — CataSync continuously expands its database coverage.

= Can I automate product generation? =

Yes. CataSync Profiles let you define rules (which product categories, which status, which mode) and schedule them to run hourly, daily, or weekly. You can also enable real-time generation that triggers automatically when a product is saved in WooCommerce.

= Is this plugin GDPR compliant? =

Yes. The plugin only sends product EAN codes and product names to the CataSync API. No customer data, order data, or personally identifiable information is ever transmitted. See the [CataSync Privacy Policy](https://catasync.com/privacy) for full details.

= Does it work with WooCommerce HPOS? =

Yes. The plugin is fully compatible with WooCommerce High-Performance Order Storage (HPOS) and has been tested with WooCommerce 7.0 through 9.x.

= How many products can I generate? =

There is no technical limit in the plugin. The number of products you can generate depends on your CataSync subscription plan. Each plan includes a pool of monthly credits, with pay-per-use overage pricing if you exceed the pool. Check [catasync.com/prezzi](https://catasync.com/prezzi) for plan details.

== Screenshots ==

1. **Products** — full product list with CataSync status column, KPI cards, bulk actions, and generation controls
2. **Profile editor** — configure category scope, schedule, generation mode, and automation settings per profile

== Changelog ==

= 2.1.1 =
* WordPress.org Plugin Directory initial release
* Added `Requires Plugins: woocommerce` header
* All inline scripts and styles moved to enqueued files for WordPress.org compliance
* Full Plugin Check compliance (0 errors, 0 warnings)

= 1.6.0 =
* **CRITICAL FIX: products are now correctly tagged with the requested mode.**
* **NEW: Mode mismatch detection.**
* **NEW: "Included credits" card on the Products page.**

= 1.5.0 =
* **NEW: Generation mode is now locked to your CataSync plan.**
* **NEW: "Validate key" now connects instantly.**
* **NEW: "Settings" link in the plugins list.**

= 1.4.0 =
* **NEW: Per-field write policies.**
* **NEW: Products page summary cards.**
* **NEW: Status filter pills.**

= 1.3.0 =
* **Fixed: "Validate key" button now works correctly.**
* **New: Top-level admin menu.**
* **New: Custom menu icon.**

= 1.2.0 =
* **Subscription warning banner.**
* **Activity log page.**
* **Daily admin email notifications.**
* **Historical statistics on the dashboard.**

= 1.1.0 =
* **Aligned to new CataSync API.**
* **Rate limit handling.**
* **Native GTIN field support.**

= 1.0.0 =
* Initial release

== Upgrade Notice ==

= 2.1.1 =
Now available on WordPress.org! Install directly from the plugin directory.
