=== Renown Computers - WooCommerce Customer & Stock Sync ===
Contributors: renowncomputers
Tags: woocommerce, customer sync, inventory, stock management, pos, crm
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later

Automatically sync and register buyers from renowncomputers.lk to your stock.renowncomputers.lk panel.

== Description ==

This plugin provides seamless, real-time integration between your WooCommerce online store (https://renowncomputers.lk) and the Renown Computers Stock Management & Client Panel (https://stock.renowncomputers.lk).

### Key Features:
* **Automatic Customer Registration**: When an online buyer completes checkout or registers an account, they are instantly created with a unique Customer ID (`RC-CUST-xxxx`) in the Stock Management Panel.
* **Instant Welcome SMS / Pass**: Automatically triggers digital loyalty card and SMS notification to the customer.
* **Loyalty Points Accrual**: Awards welcome bonus points (50 points) + points earned based on purchase total.
* **Non-blocking & Resilient**: Works asynchronously in the background so checkout is never slowed down or interrupted.
* **Order History Link**: Automatically logs WooCommerce Order IDs and total spend against the customer profile in the stock management system.
* **1-Click Historical Bulk Import**: Easily sync all existing WooCommerce customers into the Stock Panel with live progress reporting.

== Installation ==

1. Upload the `renown-woocommerce-sync` folder to the `/wp-content/plugins/` directory, or upload the `.zip` archive via WordPress Admin (`Plugins > Add New > Upload Plugin`).
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Navigate to **WooCommerce > Renown Stock Sync** in your WordPress Admin sidebar.
4. Verify the API Endpoint URL (default: `https://stock.renowncomputers.lk/api/woocommerce/sync-customer`) and Secret Key.
5. Click **Test Connection** to confirm connectivity.
6. Done! Your store is now fully connected in real-time.

== Frequently Asked Questions ==

= Does this slow down the checkout process? =
No. The plugin uses optimized HTTP requests with built-in failover, ensuring your buyers enjoy instant checkout experience.

= What happens if a customer already exists in the Stock Panel? =
The plugin matches customers by mobile phone number or email address. If the customer already exists, it updates their contact details and adds the new order to their profile without creating duplicates.
