=== VMS Guru Connector ===
Contributors: vmsguru
Tags: woocommerce, order management, vms guru, order sync, seller panel
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 8.0
Stable tag: 1.2.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Connect your WooCommerce store to the VMS Guru seller panel and manage all your orders from one powerful dashboard.

== Description ==

**VMS Guru Connector** is the official plugin for VMS Guru sellers. It bridges your WooCommerce store with the VMS Guru seller panel — syncing orders automatically so you never miss a sale.

On top of the sync, it ships a full **Order Management Dashboard** built right inside your WordPress admin, giving you everything you need without switching tabs.

= Core Features =

**One-Click Connect**
* Connect your WooCommerce store to VMS Guru in seconds — no manual API key copy-pasting
* Click "Connect with VMS Guru", log in to your VMS Guru account, click Authorize — done
* Credentials are saved automatically
* Disconnect with one click at any time

**Order Sync**
* Automatically syncs new WooCommerce orders to the VMS Guru seller panel
* Real-time status updates pushed back from VMS Guru to WooCommerce
* Manual sync available at any time from the dashboard
* Tracks last sync time and total orders synced

**Order Dashboard**
* At-a-glance stats: Pending, Processing, On Hold, Completed, Cancelled, Refunded, Failed, and Total orders
* Recent orders table with customer avatars and status indicators
* One-click Refresh Stats

**Orders Management**
* Full orders list with search by Order ID, Customer Name, Email, or Phone
* Filter by order status (Pending, Processing, On Hold, Completed, Cancelled, Refunded, Failed)
* Date range filter — Today, Last 7 Days, Last 30 Days, or Custom date range
* Inline status change — update any order status directly from the table, no page reload
* Visual loader and table lock during status updates to prevent accidental double-changes
* Paginated results with configurable orders per page
* CSV export of filtered orders

**Order Detail**
* Full order breakdown: billing, shipping, line items, totals, payment method
* Order notes history
* Back navigation preserving active filters

**Settings**
* Orders per page
* Default status filter
* Date display format
* Export format
* Enable / disable export

= WooCommerce Compatibility =
* Fully compatible with WooCommerce High-Performance Order Storage (HPOS)
* Works with WooCommerce 7.0 and above
* Respects all native WooCommerce order statuses

= External Service =
This plugin connects to the **VMS Guru** seller panel API to sync order data.
* The API endpoint is configured by the seller (your own VMS Guru panel URL)
* Data sent includes order details (order ID, status, customer name, address, items, totals)
* No data is sent without the seller entering their own API credentials
* Please review the VMS Guru Terms of Service and Privacy Policy provided by your VMS Guru panel administrator

== Installation ==

1. Upload the `vms-guru-connector` folder to `/wp-content/plugins/`, or install directly from **Plugins → Add New** by searching "VMS Guru Connector"
2. Activate the plugin through **Plugins → Installed Plugins**
3. Make sure WooCommerce is installed and active
4. Go to **VMS Guru → Connection Setup** in your WordPress admin
5. Enter your VMS Guru server URL and click **Connect with VMS Guru**
6. Log in to your VMS Guru account and click **Authorize & Connect**
7. You are connected — orders will begin syncing automatically

== Frequently Asked Questions ==

= Do I need a VMS Guru account to use this plugin? =
Yes. This plugin is designed for registered VMS Guru sellers. Contact your VMS Guru panel administrator to get your API credentials.

= Does this work with WooCommerce HPOS? =
Yes. The plugin fully supports WooCommerce High-Performance Order Storage (custom order tables).

= Will it slow down my store? =
No. All sync operations run in the background using WordPress cron jobs and are not triggered during customer checkout.

= Can I change order status from the plugin? =
Yes. You can change the status of any order directly from the Orders list without opening the order detail page. The change fires all standard WooCommerce hooks including confirmation emails.

= What order statuses are supported? =
All WooCommerce core statuses: Pending Payment, Processing, On Hold, Completed, Cancelled, Refunded, and Failed. Custom statuses registered by other plugins are also supported.

= Is my data secure? =
Yes. All AJAX requests are protected with WordPress nonces. Only users with the `manage_woocommerce` capability can access order data or change statuses.

== Screenshots ==

1. Order Dashboard — stats overview and recent orders
2. Orders List — search, date filter, status tabs, and inline status change
3. Order Detail — full order breakdown with billing, shipping, and items
4. Settings Page — configure orders per page, export options, and defaults

== Changelog ==

= 1.2.1 =
* Fixed: Renamed womData JS variable to vmsgData in wp_localize_script()
* Fixed: Renamed shortcode from vms_guru_widget to vmsg_widget

= 1.2.0 =
* Fixed: Moved inline CSS to wp_add_inline_style()
* Fixed: Moved inline JS to wp_add_inline_script() with nonces via wp_localize_script()
* Fixed: Renamed all wom_ prefixes to vmsg_ (4-char prefix) across all classes, options, and AJAX actions
* Fixed: Replaced hardcoded password with wp_generate_password() in mock data creator
* Updated: Plugin name confirmed as VMS Guru Connector

= 1.1.0 =
* Initial release
* One-click OAuth connect flow — no manual API key copy-pasting
* Order Dashboard with 8 stat cards
* Orders list with search, date range filter, status tabs, and pagination
* Inline order status change with AJAX loader and table lock
* Order detail page
* CSV export with active filter support
* Settings page
* Full WooCommerce HPOS compatibility
* VMS Guru seller panel sync (new orders + status updates)

== Upgrade Notice ==

= 1.1.0 =
Initial release. No upgrade steps required.
