=== TrackingTech for WooCommerce ===
Contributors: trackingtech
Tags: woocommerce, logistics, tracking, shipping
Requires at least: 6.4
Tested up to: 6.9
Requires PHP: 8.2
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Official TrackingTech integration for WooCommerce. Connect your store and send order data to TrackingTech for logistics and tracking workflows.

== Description ==

TrackingTech for WooCommerce connects your WooCommerce store to your TrackingTech account. After connecting, the plugin can send prepared order data to TrackingTech so your logistics workflow can continue in the external platform.

This plugin sends order data to an external service (TrackingTech API) for logistics and tracking purposes.

Key features:

* Guided connection flow (credentials + tenant/courier code + store selection). The code you enter is sent to the API as `code` and validated against the tenant registry before login.
* Secure AJAX actions with capability checks and nonce validation.
* Automatic order sync when an order reaches the `wc-processing` status.
* Clear connected/disconnected status in WooCommerce admin.

== External services ==

= TrackingTech API =

This plugin connects to the TrackingTech API. It is required to authenticate the store administrator's account, resolve the courier configuration, fetch the list of available stores, link the WooCommerce store to the logistics platform, send order data for fulfillment, retrieve synchronized order status, and uninstall the integration remotely.

No data is sent to TrackingTech until the store administrator explicitly clicks “Connect” in WooCommerce > TrackingTech.

During the connection wizard (triggered manually by the administrator), the plugin sends: the courier code entered in the form, a per-site device identifier (a SHA-256 hash derived from the site URL and WordPress auth salt — it identifies the site installation, not any individual user), the platform identifier string “woocommerce”, the administrator's email address and password, the selected store identifier, and the store URL.

Once the store is connected, the plugin automatically sends order data to TrackingTech every time an order reaches the configured status (default: wc-processing). The order data includes: the order ID, the linked customer identifier, the list of purchased products (name, SKU, quantity, price, and weight if available), and the shipping address (name, address lines, city, state, postcode, country, billing email and billing phone).

The store URL and customer identifier are also sent when the administrator disconnects the integration.

This service is provided by TrackingTech: https://trackingtech.cl — Terms of Service: https://trackingtech.cl/terms.html — Privacy Policy: https://trackingtech.cl/privacy.html


== Installation ==

1. Upload the `trackingtech-for-woocommerce` plugin folder to the `/wp-content/plugins/` directory, or install the ZIP from the WordPress admin.
2. Activate the plugin through the "Plugins" menu in WordPress.
3. Make sure WooCommerce is installed and active.
4. Go to **WooCommerce > TrackingTech** and complete the connection wizard.

== Frequently Asked Questions ==

= Does this plugin work without WooCommerce? =

No. WooCommerce must be installed and active.

= Which order status triggers synchronization? =

The plugin sends order data when the order reaches `wc-processing`.

= What is the “Courier code” in the connection form? =

It is the tenant code validated by the TrackingTech API (`code` in the resolve request). It must exist and be active in the tenant configuration before you can continue with login and store selection.

== Changelog ==

= 1.0.1 =
* Updated API endpoints from testing environment to production environment.
* Minor internal improvements and configuration updates.

= 1.0.0 =
* Initial release: guided connection (resolve + login + store selection), order sync at `wc-processing`, uninstall hook, admin status UI.
* Tenant resolve request includes `code`, fixed `platform` string `woocommerce`, and per-site `deviceId` (SHA-256 of site URL + WordPress auth salt), matching the TrackingTech API validator.
