=== Haatly Connector for WooCommerce ===
Contributors: connektify
Tags: woocommerce, multi-store, dashboard, bangladesh, orders
Requires at least: 6.2
Tested up to: 6.7
Requires PHP: 7.4
Stable tag: 1.1.0
License: GPLv2 or later

Follow this WooCommerce shop from your Haatly dashboard, next to all your other shops.

== Description ==

The shop stays the master copy. Your team keeps working in WooCommerce; the plugin reports to Haatly:

* products, variations, prices and stock — whenever they change;
* orders, including status, payment and refunds;
* a check-in every 10 minutes, so Haatly can warn you when a shop goes quiet;
* a nightly catch-up, and a "Sync everything now" button;
* cost prices, if the shop keeps them (WooCommerce cost of goods, or the WooCommerce Cost of Goods plugins),
  so Haatly's profit reports are exact. Shops without cost prices can type them into Haatly instead.

The owner can also ask the shop from Haatly to confirm or cancel an order, or pause or resume a product.
The shop does it with WooCommerce's own rules (stock goes back on cancel; a shipped order is not cancelled)
and Haatly shows the result.

Works with WooCommerce order tables (HPOS) and with statuses added by other plugins
(map them under WooCommerce → Haatly → Order statuses).

== Installation ==

1. In Haatly: your business → Connections → Connect a website → runs on "WooCommerce". Copy the API key.
2. In WordPress: Plugins → Add New → Upload Plugin → choose haatly-connector-woocommerce.zip → Activate.
3. WooCommerce → Haatly: paste the API key, tick "On", Save and connect.
4. Optional, for instant owner requests: in Haatly, set the connection's webhook address to
   https://yourshop.com/wp-json/haatly/v1/webhook, then paste its signing secret into the plugin.

To keep secrets out of the database, you can set them in wp-config.php instead:

    define( 'HAATLY_API_KEY', 'hk_live_…' );
    define( 'HAATLY_WEBHOOK_SECRET', 'whsec_…' );

== Developers ==

Filters: haatly_connector_product, haatly_connector_order (return null to skip a record),
haatly_connector_variant_cost (return the cost price of a product or variation),
haatly_connector_order_courier (return provider, consignment_id, tracking_code, status).

== Changelog ==

= 1.1.0 =
* Sends cost prices (product / variation and per order line) when the shop keeps them, for profit reports.

= 1.0.0 =
* First release.
