=== Kixxl WooCommerce ===
Contributors: TODO-wporg-username
Tags: gang sheet, dtf, print on demand, product designer, woocommerce
Requires at least: 6.5
Tested up to: TODO
Requires PHP: 8.0
Stable tag: 15.7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

The AI-powered gang sheet builder for WooCommerce: customers design and upload print-ready gang sheets right on your product pages.

== Description ==

Kixxl adds the Gangify gang sheet builder to your WooCommerce store. Gang sheets tile many designs onto one large print layout, as used for DTF and custom apparel printing.

* A gang sheet builder button on the products you enable in Kixxl.
* An upload-by-size flow for single images.
* The finished sheet goes into the WooCommerce cart with its preview, size and options.
* Orders reach your Kixxl dashboard, where the print files are generated.
* Manage products, the image library, fonts, customers, orders and settings from the Kixxl menu in WordPress.

A Kixxl account is required. The plugin connects your store to it the first time an administrator opens the WordPress admin after activation.

== Installation ==

1. Install and activate WooCommerce.
2. Install and activate Kixxl WooCommerce.
3. Open any WordPress admin page. The store connects to Kixxl automatically.
4. Open the Kixxl menu to choose a plan and enable the builder on your products.

== Frequently Asked Questions ==

= Does it work without WooCommerce? =

No. WooCommerce must be installed and active.

= Where are the logs? =

WooCommerce → Status → Logs, source "kixxl".

== External services ==

This plugin relies on the Kixxl (Gangify) service to build gang sheets, process images and manage orders. It does not work without it. Data is sent only as described below.

**Kixxl / Gangify app** (app.gangifyapp.com)

* When the store connects (first admin page load after activation): the store domain, the email address of the administrator who loaded the page, the WordPress timezone, the plan ID, a randomly generated shared secret and the callback URL used to confirm store ownership.
* On every Kixxl admin page: the store domain, to read the store's plan. The Kixxl admin pages are loaded from the app inside the WordPress admin.
* When an order is created or its status changes: the order number, status, totals and customer note, the customer's billing name, email, phone and address, the shipping address and methods, and each line item (product, variant, quantity, price, SKU and builder properties).
* When a product is updated: the product name, image URL and its variants (title, price, SKU, attributes).
* When the site title, admin email or site language changes: the site title, admin email, currency, timezone and language.
* When a builder item is added to or removed from the cart: the store domain, the gang sheet key and the cart item key.
* When the plugin is deleted: the store domain.
* While a customer uses the builder: the builder pages and their requests are passed through the store at /apps/gangify/ to the app, with the store domain and the logged-in customer's ID. Images the customer uploads are sent with them.

**Kixxl image processing** (processor.gangifyapp.com, ai-processor.gangifyapp.com, nesting.gangifyapp.com)

* While a customer uses the builder or the upload-by-size flow: the images they upload and the sheet size they choose, to store the files, prepare them for print and lay them out on the sheet.

**PostHog** (us.i.posthog.com)

* When an upload fails in the upload-by-size flow: the error, the page URL, the store and browser details, so failed uploads can be diagnosed.
* PostHog terms: https://posthog.com/terms, privacy policy: https://posthog.com/privacy

Kixxl terms of service: TODO
Kixxl privacy policy: TODO

== Source code ==

assets/js/frontend/upload-by-size.js and assets/js/frontend/kixxl-uploader.js are compiled bundles. Their source and build steps: TODO (link to the public repository).

Third-party libraries are bundled in assets/lib/ (SweetAlert2, MIT); see assets/lib/README.md for versions.

== Changelog ==

= 15.7.4 =
* Stores installed in a WordPress subfolder can open the builder, upload by size and the uploader.
* Fixed a 500 error on Update Order when editing a sheet from the cart.

= 15.7 =
* Staff can cancel a sent invoice for a staff order.
* The uploader uses the shop's Add to Cart button colors.
* The uploader's confirmation modal supports Remove I Agree and custom Proceed button text.
* The uploader is now the React build, replacing the Vue uploader.
* Fixed the Copy URL buttons for the customer edit link and order invoice in the admin.
* Updates can come from kixxl.com again when PLUGIN_UPDATE_URL is set, until the WordPress.org listing is live.

= 15.6 =
* Updates now come from WordPress.org only.
* Plugin files reorganised by area; classes and functions now use the Kixxl_WC_ / kixxl_wc_ prefix. The old names still work and are deprecated.
* The login, logout and register popups no longer load files from CDNs and can be translated.
* Uppy, Vue, SweetAlert2 and the file icons are bundled with the plugin instead of loaded from CDNs.
* Styles and scripts moved out of inline tags into assets/; admin HTML moved into templates/.
* Declares compatibility with WooCommerce order tables (HPOS) and the Cart and Checkout blocks.
* Shows an admin notice, and does nothing else, when WooCommerce is not active.
* Translations load from languages/.
