=== DomaAI ===
Contributors: maddim
Tags: ai assistant, chatbot, woocommerce, customer support, live chat
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

AI assistant chat for your site. Syncs WooCommerce products, posts, events and pages to your DomaAI company knowledge base.

== Description ==

DomaAI for business gives your company an AI assistant that answers customer questions on your website, 24 hours a day, based only on your own data.

This plugin connects WordPress with your company account in DomaAI:

* adds the DomaAI chat widget to every page (one small asynchronous script in the footer),
* synchronizes WooCommerce products (title, description, attributes, stock, variants, gross price, image, categories and tags),
* optionally synchronizes the newest blog posts as news, upcoming events from The Events Calendar and selected pages (contact, delivery, returns and so on) as information,
* sends changes in the background right after you save a product or a post, and runs a full synchronization once a day.

When your plan's item limit is reached, the plugin sends the most important content first: best selling products, then selected pages, upcoming events and newest posts.

= Requirements =

* A company account in DomaAI (https://domaai.pl/dla-firm.html) and an API key from the business panel (https://domaai.pl/firmy/, Integrations tab).
* WooCommerce 7 or newer is optional. The plugin is compatible with High Performance Order Storage.
* The Events Calendar is optional.

= Copyright and license =

Copyright (c) 2026 MADD Marcin Kisieliński, ul. Kajki 10-12, 10-547 Olsztyn, Poland, NIP 7422297084, pomoc@madd.im.

The plugin is licensed under the GNU General Public License v2 or later (https://www.gnu.org/licenses/gpl-2.0.html). The license covers the code only. It does not grant any right to use the DomaAI and MADD names or logos, or the DomaAI orb graphics, beyond what is necessary to use the DomaAI service, and a modified version must not be distributed under the DomaAI name (Annex 2 to the DomaAI Terms for businesses, point 2).

= Po polsku =

DomaAI dla firm to asystent SI, który odpowiada klientom na Twojej stronie przez całą dobę na podstawie danych Twojej firmy.

Wtyczka łączy WordPressa z kontem firmy w DomaAI:

* wstawia widżet czatu DomaAI na każdej stronie (jeden mały skrypt ładowany asynchronicznie w stopce),
* synchronizuje produkty WooCommerce (nazwa, opis, atrybuty, stan magazynu, warianty, cena brutto, zdjęcie, kategorie i tagi),
* opcjonalnie synchronizuje najnowsze wpisy bloga jako aktualności, nadchodzące wydarzenia z The Events Calendar i wybrane strony (kontakt, dostawa, zwroty) jako informacje,
* wysyła zmiany w tle zaraz po zapisaniu produktu lub wpisu, a raz na dobę robi pełną synchronizację.

Gdy baza dojdzie do limitu planu, najpierw trafiają najlepiej sprzedające się produkty, potem wybrane strony, nadchodzące wydarzenia i najnowsze wpisy.

Klucz API utworzysz w panelu firmy DomaAI (https://domaai.pl/firmy/), zakładka Integracje.

Wtyczka wysyła do DomaAI (domaai.pl, MADD Marcin Kisieliński) tylko wybrane treści: tytuły, opisy, ceny brutto, walutę, adresy stron i obrazów, kategorie i tagi, daty i miejsca wydarzeń, identyfikatory pozycji oraz nagłówek z nazwą i wersją wtyczki. Nie wysyła danych klientów, zamówień ani użytkowników strony. Przeglądarki odwiedzających ładują skrypt widżetu z domaai.pl. Dla danych osób piszących w widżecie administratorem jest właściciel strony, a MADD Marcin Kisieliński podmiotem przetwarzającym (Załącznik nr 1 do Regulaminu DomaAI dla firm). Zasady: Regulamin DomaAI dla firm (https://domaai.pl/regulamin-firmy.html), Warunki wtyczek, Załącznik nr 2 (https://domaai.pl/regulamin-firmy.html#zalacznik-2), Polityka prywatności (https://madd.im/prywatnosc.html), informacja dla osób piszących w widżecie (https://domaai.pl/informacja-dla-rozmowcow.html#widzet-firmy).

Prawa autorskie: MADD Marcin Kisieliński. Licencja GPLv2 lub późniejsza obejmuje tylko kod, nie obejmuje oznaczeń DomaAI i MADD ani grafik orbów.

== External services ==

This plugin connects to DomaAI, an AI assistant service for businesses provided by MADD Marcin Kisieliński, ul. Kajki 10-12, 10-547 Olsztyn, Poland (https://domaai.pl). It is needed to build your company knowledge base and to show the chat widget.

* **DomaAI business API** (`https://domaai.pl/api/firmy/api/v1/`). What is sent: only the content you choose to synchronize: titles, descriptions (with product attributes, stock status and variants), gross prices, currency, page and image URLs, categories and tags, event dates and places, product and post IDs, plus your API key and a header with the plugin name and version (`User-Agent: DomaAI-WordPress/<version>`). When: when you check the connection, when you click "Synchronize now", in the background shortly after you save or delete synchronized content, and once a day. The plugin does not send any data of your customers, orders or site users.
* **DomaAI chat widget** (`https://domaai.pl/api/firmy/widzet.js`). When the widget is enabled, visitors' browsers load this script from domaai.pl on every front end page and conversations with the assistant are handled by DomaAI. For the personal data of people who write in the widget, the site owner is the controller and MADD Marcin Kisieliński is the processor under the data processing agreement (Annex 1 to the DomaAI Terms for businesses).

Links:

* Terms of service (DomaAI Terms for businesses): https://domaai.pl/regulamin-firmy.html
* Plugin terms (Annex 2): https://domaai.pl/regulamin-firmy.html#zalacznik-2
* Data processing agreement (Annex 1): https://domaai.pl/regulamin-firmy.html#zalacznik-1
* Privacy policy: https://madd.im/prywatnosc.html
* Information for people who write in the widget: https://domaai.pl/informacja-dla-rozmowcow.html#widzet-firmy

== Installation ==

1. Plugins > Add New > Upload Plugin, choose `domaai-wordpress.zip`, install and activate.
2. In the DomaAI business panel (https://domaai.pl/firmy/) open the Integrations tab and create an API key.
3. In WordPress open Settings > DomaAI, paste the key and save.
4. Choose what to synchronize, save, then click "Synchronize now".

Po polsku: Wtyczki > Dodaj nową > Wyślij wtyczkę na serwer, włącz wtyczkę, w Ustawienia > DomaAI wklej klucz API, zapisz i kliknij „Synchronizuj teraz”.

== Frequently Asked Questions ==

= Does the plugin slow down saving products? =

No. Changes are queued and sent in the background (Action Scheduler when WooCommerce is active, otherwise WP-Cron), with a 10 second timeout.

= What happens to items removed from the site? =

Deleted, unpublished or hidden products and posts are removed from the DomaAI base. Items you edited in the DomaAI panel are overwritten by the next synchronization.

= Can I change the API address for testing? =

Yes. Define `DOMAAI_API_BASE` in `wp-config.php` or use the `domaai_api_base` filter.

== Changelog ==

= 1.0.0 =
* First version: widget, WooCommerce products, posts, The Events Calendar events, pages, background and daily synchronization.
