=== Piekart for WooCommerce ===
Contributors: datashastra
Tags: woocommerce, shipping, delivery, logistics, order-tracking
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 8.0
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Sync WooCommerce orders to Piekart for fulfillment/delivery and sync tracking status back onto the order.

== Description ==

Piekart for WooCommerce connects your WooCommerce store to Piekart's Transportation Management
System (TMS) for order fulfillment and delivery tracking.

= How it works =

* Enter your Piekart credentials under WooCommerce → Settings → Piekart.
* When an order reaches "Processing" (WooCommerce's paid / ready-to-fulfill state, for both
  prepaid and Cash on Delivery orders), the plugin sends the order to Piekart automatically.
* Piekart's TMS calls back into this site as the shipment progresses (shipped → in transit →
  delivered), and the plugin updates the order's tracking info and status accordingly.
* Cancelling a synced order in WooCommerce automatically sends a cancellation to Piekart.

= Third-party service disclosure =

This plugin is a connector for **Piekart** (https://piekart.in), a third-party delivery/logistics
platform, and requires an active Piekart merchant account to do anything useful — it is not a
standalone shipping solution. Merchant accounts and API credentials are provisioned directly by
Piekart's team (there is no self-service sign-up); see "Where do I get Piekart API credentials?"
below. To function, it transmits the following order and customer data to Piekart's API:

* Order ID, order number, and line items (SKU, description, quantity, weight, price)
* Customer name, phone number, and shipping/billing address
* Order total and payment type (Cash on Delivery vs. prepaid)

This data is sent only for orders that reach the "Processing" status, and only after a merchant
has entered the Piekart account credentials issued to them under WooCommerce → Settings →
Piekart — no data is transmitted before the plugin is configured.

Piekart Privacy Policy: https://piekart.in/privacy-policy

== Installation ==

1. Upload the plugin files to `/wp-content/plugins/piekart`, or install the plugin
   directly through the WordPress admin's "Plugins → Add New" screen.
2. Activate the plugin through the "Plugins" screen in WordPress.
3. Make sure WooCommerce is installed and active — the plugin will show an admin notice and stay
   inactive otherwise.
4. Contact Piekart at https://piekart.in to get onboarded as a merchant. There is no
   self-service sign-up — Piekart's team provisions your tenant ID, user ID, and API
   credentials directly in their backend and shares them with you.
5. Go to WooCommerce → Settings → Piekart and enter the Piekart tenant ID, user ID, API
   credentials, sender/warehouse details, and inbound webhook credentials you received.
6. Give Piekart your site's status-update webhook URL,
   `https://yoursite.com/wp-json/piekart/v1/status-update`, along with the same Basic auth
   username/password you configured, so Piekart's TMS can authenticate when it calls back.

== Frequently Asked Questions ==

= Does this plugin work without a Piekart account? =

No. This plugin is a connector for Piekart's delivery/TMS service and requires an active Piekart
merchant account and API credentials to send orders or receive tracking updates.

= What triggers an order being sent to Piekart? =

The order reaching the "Processing" status in WooCommerce — this covers both Cash on Delivery
orders and prepaid orders once payment is captured, since WooCommerce doesn't fire a separate
"paid" event the way some other platforms do.

= What happens if an order is cancelled? =

If the order was already synced to Piekart, the plugin automatically sends a cancellation request
to Piekart when the order's status changes to "Cancelled" in WooCommerce.

= Where do I get Piekart API credentials? =

There is no self-service sign-up. Piekart's team provisions your merchant credentials
(tenant ID, user ID, API username/password, etc.) directly in their backend and shares them
with you once you're onboarded as a Piekart customer. Contact Piekart at https://piekart.in
to get onboarded and receive your credentials.

== Screenshots ==

1. WooCommerce → Settings → Piekart configuration screen.
2. Piekart integration status page in the WordPress admin menu.

== Changelog ==

= 1.0.0 =
* Initial release: outbound order sync on "Processing", inbound status webhook
  (shipped / in transit / delivered), automatic cancellation sync, WooCommerce settings screen,
  and an integration-status admin page.

== Upgrade Notice ==

= 1.0.0 =
Initial release.
