=== BizBooks Pro for WooCommerce ===
Contributors: kenab99
Tags: accounting, bookkeeping, woocommerce, orders, refunds
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Records every paid WooCommerce order and refund in BizBooks Pro, desktop accounting software that keeps your books on your own computer.

== Description ==

**Requires BizBooks Pro desktop accounting software.** This plugin connects a WooCommerce store to it; on its own it does nothing.

BizBooks Pro is desktop accounting software for small businesses. The ledger lives on your own computer, in a PostgreSQL database, using double-entry bookkeeping.

Once the two are connected:

* **Every paid order** is recorded the moment it is paid — product sales, shipping charged, and sales tax each to their own account. Tax is never counted as revenue.
* **Every refund** is recorded against the same accounts, itemized when you refund by line item.
* **Money is routed by payment method.** Stripe and PayPal orders go to a clearing account that their payout later empties; cash-on-delivery and bank-transfer orders go straight to your bank. You choose the account for each gateway your store uses.
* **Nothing is guessed.** If an order contains something the plugin cannot account for exactly, it is listed in BizBooks Pro with the reason instead of being recorded wrong.
* **Nothing is duplicated.** Reinstall the plugin, move BizBooks Pro to a new computer, or replay a week of orders — each is recorded once.
* **A payment method added later is not guessed at.** The plugin reports your gateways when it is first activated, so one you switch on afterwards is unknown to BizBooks Pro. Its first order is held rather than filed somewhere plausible, and that gateway then appears in the account mapping — read from the held order itself — so you pick its account and retry.

**How it connects**

1. Activate the plugin. A one-time connection code appears under WooCommerce → BizBooks Pro.
2. In BizBooks Pro, open Company Settings → Integrations, click Connect on WooCommerce, and enter the code.
3. Choose which accounts sales, tax, shipping and each payment method post to. Done.

You never type your store address anywhere, and no BizBooks Pro credentials are stored in WordPress.

Information about BizBooks Pro, including its system requirements, is at [bizbooks.pro](https://www.bizbooks.pro/).

== Third-party service ==

This plugin sends order and refund data to the **BizBooks Pro connection service** at `relay.bizbooks.pro`, operated by BizBooks Pro. It exists because BizBooks Pro runs on your desktop, which is not reachable from your web host: the service holds each event until your desktop next starts and collects it.

* What is sent: the order or refund (amounts, tax, shipping, payment method, customer id and billing email, order number) at the moment it is paid, changed, or refunded; and, at activation, your store name, currency and list of payment gateways.
* What is kept: events are deleted once collected, and after 30 days regardless. The service never stores your ledger and never reads anything from your site.
* Every request is signed with a secret issued to this site; the service cannot call your store.

Terms of service: https://www.bizbooks.pro/legal/terms.html
Privacy policy: https://www.bizbooks.pro/legal/privacy.html

== Installation ==

1. Upload the plugin to `/wp-content/plugins/` or install it from the Plugins screen.
2. Activate it. WooCommerce must be active.
3. Open WooCommerce → BizBooks Pro and follow the two steps shown.

== Frequently Asked Questions ==

= Does this replace WooCommerce's own reports? =

No. WooCommerce still tracks your orders. This plugin puts them in your accounting books, alongside your expenses, bank feeds and everything else, so your P&L and balance sheet are complete.

= What about Stripe or PayPal fees? =

WooCommerce does not know what fees a gateway charged — only the gateway does. Orders post gross to a clearing account for that gateway; when the payout lands on your bank feed, BizBooks Pro records the net deposit and the fee and clears it. That is the same method accountants use.

= What if I refund part of an order without choosing line items? =

The plugin cannot tell how much of an unitemized partial refund was tax. BizBooks Pro will either record it against a "refunds and allowances" account you choose, or list it for you to look at. Refunding by line item avoids the question.

= Does it work with HPOS (high-performance order storage)? =

Yes.

= Multi-currency? =

Orders in a currency other than your books' base currency are listed in BizBooks Pro rather than recorded, so nothing is converted at the wrong rate.

== Changelog ==

= 1.0.0 =
* First release: paid orders, status changes and refunds recorded in BizBooks Pro; per-gateway routing; retry queue.
