=== Gisoo AI ===
Contributors: OWNER_WPORG_USERNAME
Tags: ai, chatbot, live chat, support tickets, ai writer
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.1.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

AI live-chat support with human handoff, support tickets and AI writing tools for WordPress and WooCommerce, powered by your Gisoo API key.

== Description ==

Gisoo AI adds an AI support assistant, a helpdesk and writing tools to a WordPress or WooCommerce site. Every AI request is made by your server to the Gisoo AI service (an OpenAI-compatible API at https://gisoo.pro/api/v1) with the API key you enter. The key is stored on your site only and never reaches a visitor's browser.

The plugin's interface is in Persian (Farsi) and right-to-left; it is made for Persian-language sites. The Gisoo service also answers from hosting and servers inside Iran.

**Live chat with an AI assistant**

* A lightweight, right-to-left chat widget that opens full screen on phones.
* The assistant answers from your own notes ("custom knowledge") and from your published posts, pages and WooCommerce products, and links to the page it used.
* For every message it decides to answer, to hand the conversation to a person, or to stay silent ("thanks", "ok"). Below the confidence level you set, it hands over.
* An operator inbox in wp-admin with reply suggestions, a per-conversation AI switch and chat-to-ticket.
* Support hours, teaser message, colours and position, pages to hide on, email alerts.
* Cost guards: AI replies per conversation and per day, chats started per connection, maximum message length, and the assistant pauses when credit runs out.

**Support tickets**

* A `[netarz_ai_tickets]` shortcode (its page is created on activation) and a "Support" tab in WooCommerce "My account".
* Tickets for members and guests; guests follow their ticket through a private link sent by email.
* Departments, priorities, assignees, internal notes, canned replies, signature, WooCommerce order picker, auto-close and customer ratings.
* AI for tickets in three modes: off, private drafts for your staff, or automatic answers when it is confident. One-click ticket summaries.

**Writer and content tools**

* An assistant box in the block and classic editors: full articles, outlines, rewriting, proofreading, translation, excerpts, titles and tags, FAQ, social posts.
* SEO title and description, saved to Yoast SEO, Rank Math, AIOSEO or SEOPress fields when one of them is active.
* WooCommerce product descriptions (full and short).
* Image generation and featured images, image alt text, and reply suggestions for comments.

**Credit and usage**

* Account balance, the key's spending limit if you set one, and a 30-day cost chart.
* A local log of every request (feature, model, tokens, request ID). The text of messages is not stored in the log.

**What it costs**

The plugin is free, open source and has no locked features. AI requests use prepaid credit in your Gisoo account, charged per request at the price of the model you choose. Model prices are listed at https://gisoo.pro/models and next to each model in the plugin's settings.

Source code: https://github.com/netarz/netarz-ai-wordpress

== External services ==

This plugin connects to the **Gisoo AI API** (https://gisoo.pro/api/v1), run by Gisoo, to generate AI answers, text and images and to show your account's balance and usage. The plugin cannot do any of its AI work without this service.

The plugin sends nothing to the service until a site administrator enters a Gisoo API key in the plugin's settings. After that, requests are made from your web server (never from the visitor's browser), and only in these cases:

* **Account and usage** – when an administrator saves the key, presses "Test connection" or opens the plugin's dashboard or settings: the API key is sent to read the account balance, the key's spending limit, the cost of the last 30 days and the list of available models with their prices.
* **Live chat** – when a visitor writes in the chat widget and the AI assistant is on: the recent messages of that conversation (the visitor's and the replies), the site name, the assistant's name, your custom knowledge notes and short excerpts of your published posts, pages and products that match the question. The visitor's email address, phone number and IP address are not sent.
* **Tickets** – when AI drafts, automatic answers or summaries are on, or a staff member asks for one: the ticket's subject and messages, the customer's name, the order number if one was chosen, the site name and matching excerpts of your published content.
* **Writer tools** – when a user with access presses a writer button: the text, title or product details they asked the tool to work on; for image generation, the prompt; for alt text, the image file itself; for comment replies, the comment and the post title.

Every request carries your API key, the plugin's version and your site's address (in the User-Agent header). Text sent for an AI request is passed on to the company that makes the chosen AI model.

* Gisoo terms of service: https://gisoo.pro/terms
* Gisoo privacy policy: https://gisoo.pro/privacy

The plugin also adds a suggested paragraph about this service to your site's privacy policy guide (Settings → Privacy).

== Installation ==

1. Install the plugin from Plugins → Add New (search for "Gisoo AI"), or upload the zip in Plugins → Add New → Upload Plugin, then activate it.
2. Create a project and an API key in the Gisoo app at https://gisoo.pro/app/api (the key starts with `sk-gisoo-v1-`). Buy credit in the app's "Credit" section, and set a spending limit on the key.
3. In wp-admin open "AI" → Settings, paste the key and save. The plugin tests the connection and shows your balance.
4. Turn on the chat widget in the "Chat" tab and write your shipping terms, payment methods, support hours and common questions in "Custom knowledge".

Full guide (Persian): https://gisoo.pro/docs/wordpress

== Frequently Asked Questions ==

= Do I need a Gisoo account? =

Yes. The AI features run on the Gisoo AI service and need an API key from https://gisoo.pro/app/api. Without a key the chat widget and tickets still work, answered by people only.

= Is the plugin free? =

The plugin is free and has no paid add-ons. AI requests use prepaid credit in your Gisoo account, at the listed price of each model. There is no monthly fee.

= Can visitors see my API key? =

No. The key is stored in your site's database and used only by your server. Browsers talk to your site's own REST routes.

= How do I keep costs under control? =

Set a spending limit on the key in the Gisoo app, and use the plugin's limits: AI replies per conversation and per day, chats started per connection and maximum message length. Choose a smaller model for chat in Settings.

= Does it send my drafts or private posts? =

No. Only published, public content is used as knowledge. Draft, private and password-protected posts are never sent.

= Does it work with WooCommerce? =

Yes, including High-Performance Order Storage (HPOS). WooCommerce is optional.

= What happens to my data when I delete the plugin? =

Conversations, tickets, attachments and settings stay, unless you turn on the "delete everything on uninstall" option in Settings → Advanced before deleting the plugin.

= I also use the NetArz AI plugin. =

Gisoo is the AI brand of NetArz, and both plugins are editions of the same code with shared settings and data. Keep only one of them active; if both are active, Gisoo AI stands down and shows a notice.

== Screenshots ==

1. The chat widget on a phone: the AI assistant answers from the site's own content.
2. The operator inbox in wp-admin, with reply suggestions and the per-conversation AI switch.
3. A support ticket in wp-admin with an AI draft and internal notes.
4. The writer assistant in the block editor.

== Changelog ==

= 1.1.1 =
* Privacy: the plugin no longer asks the Gisoo API for the model list before an API key has been entered, so nothing is sent to the service until you connect it.
* Security: generated images returned as a link are downloaded with `wp_safe_remote_get()`.
* The settings screen's page picker uses an enqueued script instead of an inline `<script>` tag; the dashboard icon is escaped with `wp_kses()`.
* WordPress.org package: text domain `gisoo-ai`, English plugin header and readme with a Persian (fa_IR) translation of the header, no custom update source.

= 1.1.0 =
* First release of the Gisoo edition: talks to https://gisoo.pro/api/v1, links to the Gisoo app and shows credit estimates in the Gisoo unit.
* If the NetArz edition is active too, this one stands down with a notice instead of a fatal error.

== Upgrade Notice ==

= 1.1.1 =
No request reaches the Gisoo service before you enter an API key, plus small security hardening. Recommended for all sites.
