=== Notaraz for WooCommerce ===
Contributors: notaraz
Tags: accounting, invoice, inventory, persian, woocommerce
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Connect WooCommerce to Notaraz online accounting: orders become invoices, buyers become customers, and one stock serves your website and your shop.

== Description ==

Notaraz is an online accounting service for Iranian businesses. This plugin connects your WooCommerce store to it in about a minute — with nothing but your mobile number.

* **Orders become invoices.** Every paid or on-hold order is recorded as a sale invoice, with its payment in a dedicated "online sales" account. An order cancelled before payment is voided; a paid order that is cancelled or refunded becomes a sale return with the money paid back.
* **Buyers become customers.** Registered customers and guest buyers are added to your customer list, matched by mobile number or e-mail so nobody is entered twice.
* **One stock for online and in-store sales.** Stock is managed in Notaraz. Sell something in the shop, receive a purchase or finish a stock count, and your website's stock updates itself.
* **Your products come with you.** Existing products, customers and the last 30 days of orders are sent when you connect. Sending again never records anything twice.
* **Built for Iran.** Rial, Toman, thousand-rial and thousand-toman prices are converted correctly; the whole screen is in Persian.

New to Notaraz? An account and a business named after your store are created when you connect, with a 14-day free trial.

= نوتراز برای ووکامرس =

فروشگاه ووکامرس خود را فقط با شمارهٔ موبایل به حسابداری آنلاین نوتراز وصل کنید: هر سفارش یک فاکتور فروش می‌شود، خریداران به فهرست مشتریان اضافه می‌شوند و موجودی کالا برای فروش آنلاین و حضوری یکی است.

== Installation ==

1. Install and activate the plugin (WooCommerce must be active).
2. Go to **WooCommerce → Notaraz accounting**.
3. Enter your mobile number, then the code sent to it.
4. That's it — products, customers and recent orders start going to Notaraz.

== Frequently Asked Questions ==

= Which stock wins, the website's or Notaraz's? =

Notaraz's. When a product is first sent, the website's quantity becomes its opening stock in Notaraz. From then on stock is changed in Notaraz and sent to the website. If the product already existed in Notaraz with the same code (SKU), Notaraz keeps its quantity.

= What happens if Notaraz is unreachable? =

Orders are queued and retried with increasing delays, then every hour. Checkout is never slowed down: nothing is sent during the customer's request.

= An order shows "Needs attention in Notaraz". =

Notaraz did not have enough stock for it (for example, the last item was also sold in the shop). The invoice is kept as a draft in Notaraz; fix the stock there and the order is recorded on the next retry.

= My website blocks the REST API. =

Stock still arrives: besides the instant update Notaraz sends, the plugin asks for changes every ten minutes.

== External services ==

This plugin connects to the Notaraz API (https://notaraz.ir/api/v1), operated by Notaraz, which is the service it exists for. Nothing is sent before you connect.

* **When you connect:** your mobile number (to text you a sign-in code), then the code, your website address and name, its currency and the plugin version.
* **While connected:** products (name, SKU, price, stock), customers (name, mobile, e-mail, billing address) and orders (items, amounts, taxes, shipping, payment method, status) — when they are created or changed, and when you press "Send" on the plugin's page.
* **Stock:** the plugin asks Notaraz for stock changes every ten minutes, and Notaraz sends changes to `/wp-json/notaraz/v1/stock` on your site, signed with a secret only your site and Notaraz know.

Terms of service: https://notaraz.ir/terms — Privacy policy: https://notaraz.ir/privacy

== Changelog ==

= 1.0.1 =
* The Persian brand name is now written «نوتراز».

= 1.0.0 =
* First release: connect by mobile number, order → invoice, customers, products, two-way stock.
