=== Nummbas ===
Contributors: nummbasadm
Tags: woocommerce, analytics, profit, inventory, reporting
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

See what you actually keep, which products make money, and where cash is getting stuck.

== Description ==

**Nummbas is a financial command center for direct-to-consumer store owners who need to see what they actually keep, not just what they sell.**

Your WooCommerce sales dashboard can look healthy while your bank balance tells a different story. Revenue alone does not show what you keep after product costs, ad spend, shipping, fees, refunds and operating expenses.

Nummbas connects your WooCommerce store with the other tools your business uses, then brings the numbers into one financial command center. See profit, cash risk, product performance and what needs attention without rebuilding spreadsheets every week.

= Know what to do next =

* **See what you actually keep.** Combine sales with connected product costs, shipping, fees, returns, ad spend and operating expenses.
* **Find the products helping or hurting profit.** Compare margins, sales velocity, refunds and stock so you know what to scale, fix or stop.
* **Protect cash tied up in inventory.** Spot slow-moving and dead stock before another reorder locks away more money.
* **Stop funding weak ads.** Connect your ad platforms to see which campaigns bring back profit and which ones burn cash.
* **Catch problems early.** Get clear alerts when margins shrink, refunds climb, expenses rise or cash comes under pressure.
* **Ask your numbers directly.** Use Nummbas-FO to ask plain-language questions about profit, products, ads and cash flow.

Nummbas labels where each number came from, when it last updated and which sources are still missing. Available results depend on your Nummbas plan and the data sources you connect.

[Try the live demo](https://demo.nummbas.com) to see how Nummbas helps a store owner find profit, cash risk and the next step.

= What this plugin does =

* Connects WooCommerce to Nummbas through secure, read-only approval inside WooCommerce.
* Updates stock levels and product costs for the deliveries you receive and the stock counts you record in Nummbas, only after you allow stock updates.
* Syncs the orders, refunds, products and inventory needed for store analysis.
* Shows connection health and the last successful sync inside WooCommerce.
* Keeps Nummbas current when relevant store data changes and lets you request a manual refresh.
* Disconnects cleanly and revokes the WooCommerce API key created for Nummbas.

Financial analysis runs in the Nummbas service, not inside WordPress. A Nummbas account and an active Nummbas plan or trial are required.

= External service disclosure =

This plugin relies on the [Nummbas service](https://www.nummbas.com) for account setup and financial analysis. It uses `app.nummbas.com` for sign-in and `api.nummbas.com` for the approved store connection.

Nothing is sent to Nummbas until a WooCommerce administrator selects **Connect to Nummbas**.

After approval:

* WooCommerce sends a read-only API key and secret directly to Nummbas over HTTPS. If you later allow stock updates in Nummbas, WooCommerce asks you to approve a read and write key, which replaces the read-only key, and this plugin revokes the key it replaced.
* Nummbas uses that connection to retrieve WooCommerce orders, products, refunds, customers and inventory required for its financial analytics service.
* This plugin stores a restricted connector token and the WooCommerce API key identifier. It does not store the WooCommerce API secret.
* When stock updates are allowed, Nummbas sends each stock increase or decrease (product, quantity and a change reference) to a WooCommerce API route this plugin adds, which WooCommerce authenticates with the approved key. The plugin applies the change with WooCommerce's own stock function and keeps the change reference and resulting stock for 90 days, so a change sent twice is applied once.
* When relevant store data changes, the plugin sends only the resource category (`order`, `refund`, `product`, or `inventory`) to Nummbas. It does not include order values, customer details or product data in that notification.
* The plugin sends its version, the WordPress version and the WooCommerce version during connection so Nummbas can provide compatible connector behavior and support.

Nummbas privacy policy: [https://www.nummbas.com/privacy-policy](https://www.nummbas.com/privacy-policy)

Nummbas terms of service: [https://www.nummbas.com/terms-of-service](https://www.nummbas.com/terms-of-service)

== Installation ==

1. Install and activate Nummbas from the WordPress plugin directory.
2. Confirm that WooCommerce is active and the store uses HTTPS.
3. Open **WooCommerce > Nummbas**.
4. Select **Connect to Nummbas**.
5. Sign in or create a Nummbas account.
6. Approve read-only access on the WooCommerce approval screen.
7. Return to **WooCommerce > Nummbas** to view connection and sync status. Your WooCommerce data will begin appearing in Nummbas.

== Frequently Asked Questions ==

= What will I see after connecting WooCommerce? =

WooCommerce data powers revenue, orders, average order value, product margins when cost data is available, sales velocity, inventory value, dead stock, refund rates and customer geography. Connect your advertising, accounting, payments, shipping and other tools in Nummbas to see the wider profit and cash picture.

= Can Nummbas change my store? =

Only if you allow it. The connection starts with read-only WooCommerce access. If you turn on stock updates in Nummbas, WooCommerce asks you to approve read and write access. WooCommerce's write permission covers the store API; Nummbas uses it only to change stock levels and product costs for the deliveries and stock counts you record. Without the plugin, Nummbas sets the new stock level directly, so a sale at the same moment can be missed; with the plugin, WooCommerce adds or removes the units in one step.

= Do I need a Nummbas account? =

Yes. The plugin connects WooCommerce to the Nummbas analytics service. A current Nummbas plan or trial is required.

= What happens if I deactivate the plugin? =

Scheduled Nummbas imports can continue through the approved read-only WooCommerce API connection, but faster store-change notifications and the WooCommerce connection screen stop until the plugin is reactivated.

= What happens if I delete the plugin? =

The plugin revokes the WooCommerce API key it created, asks Nummbas to disconnect, and removes its local settings. If the Nummbas service cannot be reached during deletion, revoking the local WooCommerce key still prevents further store access.

= Does the connector support High-Performance Order Storage? =

Yes. The plugin does not read WooCommerce order tables directly and declares compatibility with High-Performance Order Storage.

= Does it support WordPress multisite? =

Version 1.0 does not support network activation. Install and connect it separately on each WooCommerce site.

== Screenshots ==

1. Connect WooCommerce to Nummbas with read-only approval.
2. View store connection and last successful sync.
3. Refresh store data or disconnect and revoke access.

== Changelog ==

= 1.1.0 =

* Added stock updates for deliveries received and stock counts, applied with WooCommerce's own stock function once you allow them in Nummbas.
* A change sent twice is applied once.
* Revokes the previous Nummbas key when the store approves a new one.

= 1.0.1 =

* Clarified connection, reconnect and disconnect messages for store owners.

= 1.0.0 =

* Initial WordPress.org release.
* Added WooCommerce read-only approval.
* Added connection health and manual refresh.
* Added debounced change notifications.
* Added disconnect and API-key revocation.
