=== Sell.AI Returns - Zwroty i Reklamacje ===
Contributors: creatywniwsiecipl
Tags: woocommerce, zwroty, reklamacje, rękojmia, sklep
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 8.1
Stable tag: 1.5.6
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Kompletny system zwrotów i reklamacji dla WooCommerce, zgodny z polskim prawem konsumenckim i dyrektywą UE 2023/2673.

== Description ==

**Sell.AI Returns** to kompletny system obsługi zwrotów (odstąpienie od umowy) i reklamacji (rękojmia) dla sklepów WooCommerce, zgodny z polskim prawem konsumenckim.

= Funkcje w wersji darmowej =

* Formularz zgłoszenia zwrotu lub reklamacji dla klienta
* Panel administracyjny do zarządzania i rozpatrywania zgłoszeń
* Automatyczne powiadomienia e-mail (klient i sprzedawca)
* Generowanie dokumentu potwierdzenia w formacie PDF
* Śledzenie statusów z możliwością dostosowania
* Integracja z zamówieniami WooCommerce
* Zgodność z HPOS (High-Performance Order Storage)
* Zgodność z blokami Koszyka i Zamawiania (Cart & Checkout Blocks)
* **Bez limitu** zgłoszeń zwrotów i reklamacji — brak miesięcznego ograniczenia

= Sell.AI Returns Pro =

Przejdź na **Sell.AI Returns Pro**, aby uzyskać funkcje oparte na sztucznej inteligencji oraz integracje:

* Automatyczna klasyfikacja zgłoszeń przez AI
* Analiza zdjęć (vision) jako materiału dowodowego
* Generowane przez AI szkice odpowiedzi do klienta
* Integracja z Base. — automatyczna dwukierunkowa synchronizacja statusów i notatki do zamówień
* Zaawansowane statystyki i raporty
* Zarządzanie rolami wielu użytkowników

[Dowiedz się więcej →](https://trysellai.com/zwroty-reklamacje-woocommerce)

== Installation ==

1. Wgraj folder `sell-ai-returns` do katalogu `/wp-content/plugins/`.
2. Aktywuj wtyczkę w menu Wtyczki w WordPressie.
3. Upewnij się, że WooCommerce jest zainstalowane i aktywne.
4. Przejdź do sekcji **Zwroty/Reklamacje** w menu administracyjnym WordPressa.

== Frequently Asked Questions ==

= Czy wtyczka jest zgodna z polskim prawem konsumenckim? =

Tak. Wtyczka została zaprojektowana zgodnie z przepisami Kodeksu cywilnego dotyczącymi rękojmi, ustawą o prawach konsumenta oraz dyrektywą UE 2023/2673.

= Czy wersja darmowa ma ograniczenia? =

Nie. Wersja darmowa jest w pełni funkcjonalna i nie ma limitu liczby zgłoszeń zwrotów ani reklamacji.

= Czy wtyczka działa w trybie multisite? =

Tak, podstawowe wsparcie dla trybu multisite jest wbudowane. Każda witryna w sieci ma własne ustawienia.

== Screenshots ==

1. Formularz zgłoszenia zwrotu widoczny dla klienta
2. Panel administracyjny — lista zgłoszeń
3. Widok szczegółów zgłoszenia

== Changelog ==

= 1.5.6 =
* Zgodność: przetestowano z WordPress 7.1.

= 1.5.5 =
* Opis wtyczki, instrukcja instalacji i FAQ na stronie WordPress.org są teraz po polsku; zaktualizowano tagi (słowa kluczowe) na polskie.

= 1.5.4 =
* Renamed the plugin display name to "Sell.AI Returns - Zwroty i Reklamacje" for clarity in Polish search results (plugin slug and text domain are unchanged).

= 1.5.3 =
* Added a `sellai_returns_after_request_deleted` action, fired when a request is permanently deleted, so Sell.AI Returns Pro can clean up its own per-request data (see Pro changelog).

= 1.5.2 =
* Fixed the Status badge in the admin request list overflowing into the Termin (deadline) column on longer status labels (e.g. "W trakcie rozpatrywania"). Same fix applied to the customer-facing "My Account" status badge. Widened the Status column slightly for breathing room.

= 1.5.1 =
* Fixed the customer-facing return form's Ajax fallback to never hardcode the `/wp-admin/admin-ajax.php` path (broke on subdirectory installs); it now reads a server-rendered `admin_url()` value instead.
* Renamed an internal session transient from the generic `sar_session_` prefix to `sellai_returns_session_`, per WordPress.org plugin review guidelines on unique, prefixed option/transient names.

= 1.5.0 =
* Removed the monthly request limit — the free plugin is now fully functional with no cap on returns/complaints (WordPress.org Guideline 5 compliance).
* Base. integration moved to Sell.AI Returns Pro. The free settings screen now exposes generic extension points; Pro adds the Integrations tab, Base. sync and the request-detail return link.

= 1.4.0 =
* Trash (soft delete) — deleted requests now go to a Trash bin instead of being removed immediately. A new "Kosz" view in the requests list lets you restore them or delete permanently, available as both row and bulk actions. Trashed requests are hidden from the customer "My returns" view and from the dashboard counters.

= 1.3.0 =
* Pro: AI analysis now runs automatically in the background when a new request is submitted and the "automatyczna analiza AI" toggle is enabled.

= 1.2.0 =
* Feature: Base. integration — automatic return creation in Base. on request submission; bidirectional status sync (Plugin→Base. immediately, Base.→Plugin via hourly WP-Cron); status mapping UI; loop-prevention flag.
* Feature: Per-product return reason — customers select a reason per product; global legal basis is derived automatically (warranty / withdrawal / transport damage / mixed).
* Enhancement: Product price in request displayed using WooCommerce currency formatting settings.
* Fix: Base. cron sync — clamped last_log_id to minimum 1 (Base. API rejected 0).

= 1.1.0 =
* Feature: "Zwroty i reklamacje" section in WooCommerce My Account — customers can view all their return and complaint requests with type and status badges.
* Feature: Logged-in customers skip OTP email verification when accessing the form from My Account.

= 1.0.0 =
* Feature: "Zwrot / Reklamacja" button in WooCommerce My Account — orders list and order detail page.
* Feature: Logged-in customers skip email OTP verification when accessing the form from My Account.
* Feature: Base. integration — automatic status sync and bidirectional order notes.
* Enhancement: Admin settings — new Integrations tab (Base. API key, status mapping, sync log).
* Enhancement: Admin settings — returns form page selector activates My Account button automatically.
* Compatibility: WordPress 7.0, WooCommerce 10.8.

= 0.6.0 =
* Fix: OTP verification email deliverability — added From/Reply-To headers using site admin email so SPF passes on all hosting environments.
* Fix: OTP email now sends as multipart (HTML + plain text) to avoid spam filtering on Gmail and other providers.
* Fix: Order value in admin detail view displayed raw HTML instead of formatted price.
* Fix: Request description in detail view was center-aligned due to theme CSS bleeding.
* Fix: Request type badge in list view overflowed into Status column on long labels.
* Fix: Product thumbnail missing in request detail view (image field not saved in products_json).
* Enhancement: Loading spinner on Send Code, Verify, and Submit buttons during AJAX calls.

= 0.5.0 =
* First public release.
* Customer-facing form: order lookup by email + order number, email verification code, photo attachments.
* Admin panel: request list with filters, detail view with AI analysis panel (Pro), status management.
* Automated email notifications for customers and merchants.
* PDF confirmation document generation.
* WooCommerce HPOS and Cart/Checkout Blocks compatibility.
* Sell.AI Returns Pro integration: AI classification, vision analysis, response drafts.

= 0.4.0 =
* AI analysis integration and license gating for Pro features.
* Admin detail view: sidebar panel with AI-generated insights.

= 0.3.0 =
* PDF generation and email notification system.
* Request status workflow with customisable labels.

= 0.2.0 =
* Admin request list table with search, filters and bulk actions.
* WooCommerce order data integration in request detail view.

= 0.1.0 =
* Initial internal release — plugin foundation and database schema.

== Upgrade Notice ==

= 1.1.0 =
Adds "Zwroty i reklamacje" section to WooCommerce My Account. After updating, go to Settings → Permalinks and save to refresh rewrite rules (or the plugin handles it automatically on first load).

= 1.0.0 =
First stable release. Adds My Account integration button, Base. sync, and WordPress 7.0 / WooCommerce 10.8 compatibility.

= 0.6.0 =
Email deliverability fix for OTP verification codes. Recommended update for all users.
