=== TraceBatch - Product Traceability for WooCommerce ===
Contributors: himitek, ansobimat
Tags: traceability, blockchain, polygon, qr code, product origin, compliance, organic, VietGAP, product passport
Requires at least: 5.6
Tested up to: 7.0
WC requires at least: 5.0
WC tested up to: 8.8
Stable tag: 1.0.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Verify product origin, generate blockchain-secured traceability profiles, and print custom thermal QR labels for your WooCommerce products.

== Description ==

**TraceBatch** is a lightweight, fully functional compliance and origin verification extension for WooCommerce. It enables international merchants (selling organic foods, handcrafts, cosmetics, and export goods) to register product batch information on the Polygon Blockchain network and print high-quality QR code labels.

When buyers scan the printed QR code on your product packaging, they are redirected to a public, transparent traceability certificate on TraceBatch, establishing trust and compliance instantly.

This plugin is 100% free, fully functional, and does not contain any locked features, license restrictions, or usage limits.

=== Features ===
* **Easy API Integration:** Input your API key and URL settings to connect to the TraceBatch Gateway.
* **Blockchain Registration:** Register single products on the Polygon Blockchain network directly from the WooCommerce edit screen.
* **Bulk Registration:** Select multiple products in your WooCommerce catalog and register them all on the blockchain in one click.
* **Thermal Label Generator:** Print 100mm x 150mm (4x6 inch) thermal labels with dynamic QR codes, origin info, and the blockchain TxHash.
* **Unlimited Use:** No monthly registration caps, no gated features, and no subscription keys.

== External services ==

This plugin relies on the following third-party external services:

1. **QR Code Generator API (qrserver.com)**
   * **Service URL:** `https://api.qrserver.com/v1/create-qr-code/`
   * **Purpose:** Used to dynamically generate packaging labels with QR codes.
   * **Data Sent:** Public product traceability URL. No personal or store customer data is transmitted.
   * **Links:** [Terms of Service](https://goqr.me/legal/tos-api.html) & [Privacy Policy](https://goqr.me/de/rechtliches/datenschutz-api.html)

2. **Blockchain API Gateway**
   * **Service URL:** Configurable in the settings page (defaults to `http://213.35.102.156/api/v1/trace`).
   * **Purpose:** Used to write product traceability data (Product ID, Name, Origin, Business Owner) to the Polygon blockchain.
   * **Data Sent:** Product ID, product name, origin location, and owner name. No customer or order transaction data is sent.
   * **Links:** [Terms of Service](https://himitek.com/legal/terms-of-service.html) & [Privacy Policy](https://himitek.com/legal/privacy-policy.html)

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/tracebatch-traceability-woocommerce` directory, or install the plugin through the WordPress plugins screen directly.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Navigate to **WooCommerce -> Cài đặt TraceBatch** to configure your API key, Gateway URL, and Business Owner Name.
4. Go to any WooCommerce product, fill in the **Nơi xuất xứ (Origin)**, and click **Đăng ký Lên Blockchain**.

== Frequently Asked Questions ==

= Does this plugin require gas fees? =
No. Gas fees for the Polygon network transactions are covered by your API key settings linked to your TraceBatch gateway account.

= Can I use standard thermal printers to print labels? =
Yes, the printed label layout is optimized for standard 100x150mm (4x6 inch) decal thermal label paper.

== Screenshots ==

1. Configuration page under WooCommerce Settings where API Key and Gateway URL are set.
2. Blockchain registration box and traceability metadata on the WooCommerce Product Edit screen.
3. High-quality 100x150mm thermal QR label generated for package printing.

== Changelog ==

= 1.0.0 =
* Initial Release.
* Added single and bulk product blockchain registration to Polygon.
* Integrated dynamic thermal QR label generator.
