=== Haysoft AI Suite – AI Content Writer, Image Generator & Translator ===
Contributors: geotrendapp
Tags: ai content generator, ai image generator, ai translation, seo, woocommerce
Requires at least: 5.6
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 2.5.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Generate SEO-friendly articles, images and multilingual translations for WordPress and WooCommerce using AI.

== Description ==

Haysoft AI Suite brings AI-assisted content production into the WordPress screens you already use. Write a post, generate an image, describe a product, translate a page, or fill in the missing alt text of an image without leaving your dashboard.

The plugin is a client for the **GeoTrend AI** cloud service. An account is created for your site and a limited amount of trial credit is provided so you can try the features before choosing a plan. Operations consume your monthly plan quota first; credits are only spent after the quota runs out.

**Please read the "External services" section below before installing.** This plugin does not work offline: the text, product data and images you choose to process are sent to the GeoTrend AI service, and from there to an AI model provider.

= Content generation =

* Generate full articles from a topic, with headings, keywords and a chosen tone
* Get title, description and keyword suggestions before you commit
* Save results directly as a draft post or page
* Fill in SEO title and meta description for Yoast SEO, Rank Math and SEOPress

= Images =

* Generate royalty-free images from a text prompt
* Produce the image title, caption, alt text and description at the same time
* Analyse an existing image in your Media Library and fill its missing fields
* Process images in bulk, with a limit, so large libraries are handled safely

= Translation (Polylang) =

* Translate posts, pages, categories and media fields into your site languages
* Translate SEO fields, including keyphrases adapted to the target language
* Translate WooCommerce products together with their attributes

= WooCommerce =

* Generate long and short product descriptions
* Suggest product keywords from the product title and features

= Languages =

The interface is fully translatable. Turkish translation is included; content itself is generated in the language of your WordPress profile.

== External services ==

This plugin relies on the **GeoTrend AI** cloud service (https://aiseo.geotrend.app) to perform every AI operation. No AI processing happens on your own server.

**When data is sent**

* When you press "Connect and Start Free" on the Overview screen, to register the site and open an account for it. Nothing is sent before you press it — activating the plugin alone does not contact the service
* Each time you press a generate, translate, analyse or suggest button
* Periodically, when the plugin refreshes your credit balance and module permissions

**What is sent**

* Your site domain and site URL, and the license key issued to your site
* Whatever you submit for the operation you started. Depending on the feature this may include: the topic, title, description, keywords, tone and requested length of an article; post title, content, excerpt and tags for translation; a category name and description; a product title and its features; media title, caption, alt text and description; an image prompt; or, when you use image analysis, the image file itself
* The target language of the operation

The plugin does not send your visitors' personal data, your WordPress user accounts, or any content you have not explicitly submitted to an AI operation.

**Onward processing**

GeoTrend AI processes these requests using Google's Gemini models. Content you submit therefore reaches Google as part of fulfilling your request.

* GeoTrend AI terms of service: https://geotrend.app/seo/geotrend-ai-suite-plugin/#terms
* GeoTrend AI privacy policy: https://geotrend.app/seo/geotrend-ai-suite-plugin/#privacy
* Google Gemini API terms: https://ai.google.dev/gemini-api/terms
* Google privacy policy: https://policies.google.com/privacy

== Installation ==

1. Upload the plugin to `/wp-content/plugins/haysoft-ai-suite/`, or install it from the Plugins screen.
2. Activate the plugin. You are taken to **GeoTrend AI → Overview**.
3. Review what will be sent to the GeoTrend AI service, then press **Connect and Start Free**. Your site is registered and trial credit is added. Nothing is sent to the service until you press this button.
4. Open **GeoTrend AI → Create New Content** to generate your first article.

For translation features, install and configure Polylang first, and define the languages you want to use.

== Frequently Asked Questions ==

= Do I need an API key? =

No. When you press "Connect and Start Free", the plugin registers your site with the GeoTrend AI service and stores the key it receives. You never copy or paste a key.

= Does the plugin contact the service on its own? =

No. Activating the plugin does not send anything. The connection is made only when you press "Connect and Start Free", and after that only when you use a feature or refresh your balance.

= Does the plugin work without an internet connection? =

No. Every AI feature is performed by the GeoTrend AI cloud service. See the "External services" section.

= What happens to the content I submit? =

It is sent to GeoTrend AI and processed with Google's Gemini models to produce the result you asked for. See "External services" for the details and the relevant policies.

= What are credits and quota? =

If you have a plan, each operation uses your monthly quota first. Credits are a backup balance, spent only after the quota is exhausted. New sites receive a limited amount of trial credit so the features can be tried before choosing a plan.

= Which SEO plugins are supported? =

Yoast SEO, Rank Math and SEOPress. The plugin writes the SEO title, meta description and focus keyphrase into whichever of these is active.

= Is Polylang required? =

Only for the translation features. Article generation, image generation and WooCommerce descriptions work without it.

= Can I use it with the block editor? =

Yes. The plugin adds entry points to both the block editor and the classic editor, as well as to the Media Library.

== Screenshots ==

1. Overview screen showing plan, remaining quota and credits
2. Article generation with topic, keywords and tone
3. Image generation with automatically produced media fields
4. Translating a post into another language
5. Filling missing alt text in the Media Library in bulk

== Changelog ==

= 2.5.1 =
* All function, class, constant, option, AJAX action and script handle names now use the plugin-specific "gtas" prefix, replacing the generic "ai" prefix
* Existing settings are migrated automatically to the new option names on upgrade
* Translation payloads are now type-validated and sanitised at every depth before being written to posts, products or Elementor data
* Uploaded image data is validated as a real image before it is written to the Media Library
* Fixed the WooCommerce description generator, which referenced an API client class that did not exist and therefore always failed
* Word count is now validated as a number
* The plugin no longer contacts the service at all before you connect your site; the only request allowed before connecting is the connection request itself
* Short information requests (prices, account status) no longer wait up to three minutes when the service is unreachable
* Removed an unused WooCommerce module that never loaded; product description generation continues to work through the AI Writer product box
* Fixed a "translation loading triggered too early" notice shown on every admin page when WP_DEBUG is enabled
* Translations now keep embedded videos and maps (iframes) instead of stripping them
* Elementor: Icon Box, Image Box, Testimonial and Alert texts are now translated; HTML widget code is copied unchanged instead of being sent for translation
* Product translation: the translated product now gets the correct language and is linked to the original in Polylang
* Category and tag translation no longer changes the language of the original term when a name (such as a brand) stays the same; a separate term is created for the target language
* Sub-categories keep their parent category in the translated language
* Normal (non-Elementor) posts: translated categories are now saved as categories instead of tags
* The translation log now warns when product categories or tags are not enabled for translation in Polylang
* The editor's Publish and Save buttons are locked while a translation is being written, so the unsaved screen cannot overwrite the translated categories, tags or language links; the edit page now opens about two seconds after the translation finishes
* Block editor: the new translation screen (Polylang "+") now shows a bar at the top with the AI translation button and live progress, with the same button also in the sidebar, so posts and pages can be AI-translated without the Classic Editor; the "Create with AI" invitation is no longer shown on translation screens
* Paid actions now check the security token and user permission before checking credits
* Fixed quotation marks shown as "&quot;" in connection and credit messages, and updated those messages to point to the "Haysoft AI" menu
* Added missing unslashing and existence checks on several submitted fields

= 2.5.0 =
* The plugin no longer contacts the service on activation; you now connect explicitly from the Overview screen after reviewing what is sent
* Added a central security gate: every AJAX endpoint now verifies a nonce and the user's capability
* Added module permission handling, so modules can be enabled per plan
* Media Library tools: analyse an image and fill its title, caption, alt text and description
* Bulk processing for images that are missing alternative text
* Translation for media fields, categories and SEO fields
* Live meter showing the cost of an operation while it runs
* Operations now use the monthly plan quota before spending credits
* Fixed escaped apostrophes appearing in generated titles
* Fixed SEO meta fields not being saved after generation
* Removed hooks that pointed to methods which did not exist
* Removed a duplicate hook that could have charged for the same translation twice

== Upgrade Notice ==

= 2.5.1 =
Internal names are now uniquely prefixed and input validation has been tightened. Your existing settings are migrated automatically.

= 2.5.0 =
Security update: all AJAX endpoints now verify nonces and user capabilities. Recommended for all users.
