=== Dark Obsidian Connector ===
Contributors: darkobsidian
Tags: woocommerce, sync, inventory, orders, business management
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 8.1
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Connect your WooCommerce store to Dark Obsidian Business OS and sync products, orders, and customers automatically.

== Description ==

Dark Obsidian Connector links your WooCommerce store to [Dark Obsidian Business OS](https://darkobsedian.sameergul.com), a complete business management platform for retail, wholesale, and service businesses.

**What syncs:**

* **Products** — catalog, prices, stock levels, and images
* **Orders** — imported as sales records with full line-item detail
* **Customers** — synced to the Dark Obsidian CRM module
* **Inventory** — real-time stock updates via WooCommerce webhooks
* **Analytics** — revenue trends and business intelligence

**One-click connection. No API keys to copy.**

Click "Connect to Dark Obsidian" in your WordPress admin, sign in to your Dark Obsidian account, choose which business to link, and the connection is established automatically. Credentials are provisioned server-to-server and never stored in WordPress.

**Real-time webhook updates:**

New orders, product changes, and customer registrations in WooCommerce are pushed to Dark Obsidian instantly via WooCommerce's native webhook system.

**Requirements:**

* WordPress 6.0 or higher
* WooCommerce 7.0 or higher
* PHP 8.1 or higher
* HTTPS on your WordPress site
* A Dark Obsidian Business OS account (free trial available at darkobsedian.sameergul.com)

== Installation ==

1. Go to **WordPress Admin → Plugins → Add New → Upload Plugin**
2. Upload the `dark-obsidian-connector.zip` file and click **Install Now**
3. Click **Activate Plugin**
4. Ensure WooCommerce is installed and active
5. Go to **WordPress Admin → Dark Obsidian** (appears in the left menu)
6. Click **Connect to Dark Obsidian →**
7. A secure popup opens — sign in to your Dark Obsidian account and follow the prompts

No API keys or technical configuration are required. The entire setup takes under two minutes.

== Frequently Asked Questions ==

= Do I need a Dark Obsidian account? =

Yes. This plugin is the bridge between your WooCommerce store and Dark Obsidian Business OS. You will need an active account at [darkobsedian.sameergul.com](https://darkobsedian.sameergul.com) to connect.

= Is the connection secure? =

Yes. The initial handshake uses a one-time HMAC-signed nonce with a 15-minute TTL. All subsequent server-to-server calls (from Dark Obsidian to your WordPress site) are verified with HMAC-SHA256 signatures. Credentials are delivered over TLS and never stored in your WordPress database.

= What data is synced? =

Products (name, SKU, price, stock quantity, images), orders (status, totals, line items, customer), and customers (name, email, phone). Only published products are synced. Orders are synced regardless of status.

= Will this slow down my website? =

No. The plugin has zero front-end footprint — it only loads in the WordPress admin and responds to webhook calls. There are no queries on public page loads.

= Can I disconnect at any time? =

Yes. Click **Disconnect** on the Dark Obsidian admin page. This immediately removes the WooCommerce API key and all registered webhooks from your site. Your existing data in Dark Obsidian is not deleted — only the live sync stops.

= What WooCommerce version is required? =

WooCommerce 7.0 or higher. The plugin declares High-Performance Order Storage (HPOS) compatibility and has been tested through WooCommerce 9.x.

= Can I reconnect after disconnecting? =

Yes. Click "Connect to Dark Obsidian →" again. A new API key and webhook set will be provisioned automatically, and your previous sync history in Dark Obsidian will be preserved.

= Is the plugin compatible with multisite? =

The plugin is designed for single-site installs. Multisite compatibility has not been tested.

== Screenshots ==

1. Disconnected state — pre-flight checklist, feature overview, and one-click connect button.
2. Connected state — linked business name, WordPress and WooCommerce version badges, live sync statistics, and management controls.

== Changelog ==

= 1.0.0 =
* Initial release.
* One-click connection via Dark Obsidian secure connect portal.
* Automatic WooCommerce REST API key provisioning (read/write, generated server-side).
* Webhook registration for seven event topics: product.created, product.updated, product.deleted, order.created, order.updated, customer.created, customer.updated.
* Admin dashboard with sync statistics (products, orders, customers, last sync time).
* Clean disconnect flow: removes API key and all webhooks, clears plugin options.
* WooCommerce High-Performance Order Storage (HPOS) compatibility declared.

== Upgrade Notice ==

= 1.0.0 =
Initial release — no upgrade steps required.
