=== Maa Commerce Connector ===
Contributors: shinu1503
Tags: woocommerce, mobile app, orders, inventory, contact form 7
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.0
Stable tag: 1.0.0
WC requires at least: 8.0
WC tested up to: 11.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Securely connect your WordPress and WooCommerce site to the free Maa Commerce Hub app and manage orders, stock and enquiries from your phone.

== Description ==

**Maa Commerce Connector** links your website to **Maa Commerce Hub**, a free Android app for store owners. Once connected you can:

* See new orders the moment they arrive and update their status, add notes and tracking numbers.
* Check and adjust stock for products and variations.
* Read Contact Form 7 enquiries in one inbox, with order numbers detected automatically.
* Edit posts and pages, moderate comments and check site health.
* Manage several websites from one app.

* Write and publish posts and pages with a featured image, from your phone camera, gallery or your existing Media Library.
* See sales analytics and export orders, products, customers and revenue to Excel.
* Invite your team with roles, and get push notifications for new orders, payments, enquiries and low stock.

Free for life on WordPress. No ads.

= Secure by design =

* **QR pairing approved by a WordPress administrator.** Scanning the code in the app is not enough: an admin on this site sees which Maa account asked and must approve it.
* **No passwords or API keys leave your site.** The QR code contains only a short-lived pairing id and a six-digit code.
* **Signed requests.** Every call between your site and Maa Commerce Hub is signed (HMAC-SHA256) with a per-site secret, time-limited and protected against replays. The secret is encrypted in your database.
* **Least privilege.** The app can view and update orders, products, stock, enquiries, posts and pages. It cannot see passwords or payment credentials, change plugins, themes or users, or issue refunds.
* **Disconnect any time** from this plugin or from the app. Access is revoked immediately.

= Light on your site =

* Nothing is loaded on your public pages.
* Checkout never waits for Maa Commerce Hub: changes are queued and sent in the background with Action Scheduler (bundled with WooCommerce) or WP-Cron, with automatic retries.
* Changes reach the app within seconds: they are sent right after the visitor's page has been delivered, even on sites with little traffic.
* Fully compatible with WooCommerce High-Performance Order Storage (HPOS).
* **Fast sync (optional, on by default):** while Maa Commerce Hub reads store data, only WooCommerce, contact-form plugins and this connector are loaded, using a small must-use file (`wp-content/mu-plugins/maa-connector-lean.php`). Visitors, wp-admin and changes made from the app are not affected. The file is removed when you turn the option off or deactivate the plugin.
* **Automatic object cache (optional, on by default):** if your hosting provides Redis or Memcached and LiteSpeed Cache is active, the connector turns on LiteSpeed's object cache, checks that it works, and switches it off again by itself if it doesn't. It never changes an object cache you set up yourself.

= External service =

This plugin connects your site to the **Maa Commerce Hub** service operated by Maa Labs. That connection is the plugin's purpose; nothing is sent until an administrator connects the site.

* **What is sent, and when:** after you connect, the plugin sends order, product, stock, customer, contact form enquiry, post, page, comment and media details whenever they change, plus your site address and WordPress, WooCommerce and PHP versions. You can turn each data type off under *Maa Connector → Settings*.
* **Where:** the Maa Commerce Hub API (`hub.maalabs.in`).
* **Never sent:** passwords, payment card or gateway credentials, file uploads from forms.
* Terms of service: https://hub.maalabs.in/terms/
* Privacy policy: https://hub.maalabs.in/privacy/

❤️ *Dedicated in loving memory of Maa — 18 May.*

== Installation ==

1. Install and activate **Maa Commerce Connector** from *Plugins → Add New*.
2. Install the **Maa Commerce Hub** app on your Android phone and create a free account.
3. In WordPress, open *Maa Connector → Overview* and click **Connect My Website**.
4. In the app, choose *Add website* and scan the QR code (or type the six-digit code).
5. Back in WordPress, check the account shown and click **Approve this account**.
6. Tap *Allow and start sync* in the app. Your orders and products start syncing.

== Frequently Asked Questions ==

= Do I need WooCommerce? =

No. Without WooCommerce you can still manage posts, pages, comments, media and Contact Form 7 enquiries. Orders and products need WooCommerce.

= Does it work with HPOS? =

Yes. Orders are read and written only through WooCommerce's own APIs.

= Can the app issue refunds? =

No. Refunds go through your payment gateway, so they are issued in WooCommerce admin. The app shows refunds that were made there.

= Can I edit pages built with Elementor? =

You can change the title and category from the app. Layout and content need the Elementor editor.

= What happens if my site is offline? =

Changes wait in a queue and are delivered when the site is reachable again. Maa Commerce Hub also re-checks everything every few hours, so nothing is missed.

= How do I disconnect? =

Open *Maa Connector → Overview → Disconnect*, or remove the website in the app. Either way, access ends immediately.

= What is removed when I delete the plugin? =

Connection details, keys and unsent changes are always removed. Stored enquiries and logs are removed too if you tick that option under Settings.

== Screenshots ==

1. Connect your website.
2. Pair securely with a QR code and approve the account.
3. Connected: status, last sync and health.
4. Sync & Data.
5. Permissions: what the app can and cannot do.

== Changelog ==

= 1.0.0 =
* Initial release: secure QR pairing with admin approval, signed REST API, background sync of orders, products, stock, customers, Contact Form 7 enquiries, posts, pages, comments and media, app commands for order status, notes, tracking, stock, prices and comment moderation, activity log, diagnostics and settings.
* Full product and post editors, media uploads and Media Library picking from the app.
* Fast sync (lean loading while the app reads data) and automatic Redis / Memcached object cache through LiteSpeed Cache.
* Changes are delivered right after the page is sent, plus a no-cache guard so page caches never serve stale store data.

== Upgrade Notice ==

= 1.0.0 =
Initial release.
