=== Tevrna Stock Planner for WooCommerce ===
Contributors: tevrna
Tags: inventory, stock forecast, reorder, low stock, purchase planning
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Requires Plugins: woocommerce
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Know what to reorder, how much and when. Sales speed, days of stock left, stockout dates and reorder suggestions for every WooCommerce product.

== Description ==

Running out of a best seller costs you sales. Ordering too much ties up cash on a shelf. Tevrna Stock Planner reads your WooCommerce orders and tells you, product by product, **what to order, how much, and by when**, in plain words.

It works out of the box. Install it, and it reads your past orders in the background. A minute later you have a list sorted by what needs attention first.

= What you get, free =

* **Every product and variation, no limits.** Simple products, variations with their own stock, and variable products that share one stock.
* **Sales speed** over the last 7, 30 and 90 days, with a 12-week trend line for each product.
* **Days of stock left** and the **date it will run out**.
* **Out-of-stock days are left out.** A product that was sold out for two weeks doesn't look slow just because it couldn't sell.
* **One-off bulk orders are ignored.** A single wholesale order won't make the plugin tell you to buy ten times too much.
* **Reorder advice:** when to order (based on your supplier's lead time and a safety buffer) and how many to order (enough for the number of days you choose).
* **Clear statuses:** Out of stock, Order now, Order soon, Healthy, Overstock, Not selling, New, and Not tracked.
* **Not-selling (dead) stock list** with the cash it ties up, when your products have a cost price.
* **"Why" for every product.** Click any product to see the reasons behind its advice, a stock outlook chart, weekly sales, and the numbers.
* **Lead time per product** when one supplier is slower than the rest, and an **Ignore** switch for discontinued or made-to-order items.
* **Weekly email** with what to order now, what to order soon, and what isn't selling.
* **Filters, search and CSV export** that opens in Excel, Google Sheets, Numbers and LibreOffice.
* **"Stock lasts" column in your Products list**, so you see it while you work.
* **Any language, any currency.** All text is translatable, numbers and dates follow your site language, and right-to-left languages such as Arabic and Hebrew are supported.
* **Built for big catalogs.** Background processing with WooCommerce's Action Scheduler, small database tables and no slowdown at checkout.
* **Compatible with High-Performance Order Storage (HPOS)** and the legacy order storage.
* **Ready for AI assistants.** Read-only abilities through the WordPress Abilities API let tools you trust ask "what should I reorder?" with the same permissions as your shop managers.
* **WP-CLI commands** for developers and agencies.

= How the advice is worked out =

1. **Sales speed:** units sold divided by the days the product was actually in stock, blending the last 7, 30 and 90 days so recent weeks count a little more. Slow sellers also look at the whole year so a single sale doesn't swing the number.
2. **Reorder point:** what you will sell while you wait for new stock (lead time) plus a safety buffer.
3. **Order quantity:** enough to cover the lead time and the number of days you want each order to last, plus the safety buffer, minus what you already have.

Each product shows these steps in plain words, so you can check the advice before you act on it.

= Your data stays on your site =

Stock Planner does all its work on your own server. It doesn't send your sales, products or any other data anywhere, it doesn't track you, and it doesn't load anything from other websites.

= Stock Planner Pro =

For growing stores, the separate Pro add-on adds forecasts that use last year's season and the current trend, lost-sales estimates, suppliers with delivery times, minimum orders and pack sizes, one-click purchase orders as PDF or CSV sent straight to suppliers, a budget mode that tells you what to buy first with the money you have, stock reports, and importing older sales from Shopify, Etsy, Amazon, Square or any spreadsheet. The free plugin stays fully usable on its own.

== Installation ==

1. Install and activate WooCommerce.
2. Go to **Plugins → Add New**, search for **Tevrna Stock Planner**, then install and activate it.
3. Open **Stock Planner** in the admin menu. The first visit shows progress while your past orders are read; this happens once.
4. Optional: open **Stock Planner → Settings** to set your usual supplier lead time, safety buffer and how long each order should last.

For reorder advice, a product needs **Track stock quantity** turned on in its Inventory tab, and WooCommerce stock management must be enabled.

== Frequently Asked Questions ==

= Which orders count as sales? =

By default, orders that are Processing, Completed or On hold. You can choose other statuses in the settings, including custom statuses added by other plugins. Refunded items are subtracted unless you turn that off.

= Does it change my stock or my orders? =

No. It only reads them. The only things it saves on products are the optional lead time and "Ignore" settings you set yourself.

= How are variations handled? =

A variation with its own stock is planned on its own. When a variable product shares one stock across its variations, the sales of all those variations are added together.

= How do I get Stock Planner Pro? =

Click the green **Upgrade** item under **Stock Planner** in your dashboard. It shows the plans and what each one includes; the buttons open a secure checkout run by Freemius, our payment partner. After paying you get an email with your license key and the Pro download. Upload Pro on the Plugins screen, keep this free plugin active, and enter the key under **Stock Planner → Pro license**.

= My store is new. Will it work? =

Yes. The advice starts with whatever sales you have and improves as more orders come in. New products are marked as New until their first sale.

= Where does the cost price come from? =

From WooCommerce's Cost of Goods Sold feature, or from popular cost-of-goods plugins. Costs are optional; they're only used to show money values.

= Does it work with multi-site? =

Yes. Each site keeps its own data.

= Can I use it from the command line? =

Yes. Try `wp tevrna-sp status`, `wp tevrna-sp list --status=attention`, `wp tevrna-sp explain <product-id>`, `wp tevrna-sp sync` and `wp tevrna-sp email`.

= Does it send any data to you? =

No. There are no external requests, no tracking and no data collection.

= What happens when I delete the plugin? =

Background jobs are removed. Plugin data is kept in case you reinstall, unless you turn on "Also delete all Stock Planner data and settings" in the settings first. Your products and orders are never touched.

== Screenshots ==

1. The planner: what to order today, how long stock lasts, and the suggested quantity for each product.
2. Product details: the reasons behind the advice, a stock outlook chart and weekly sales.
3. Settings with a live example of what the numbers mean.
4. The weekly stock email.
5. "Stock lasts" in the WooCommerce Products list.

== Changelog ==

= 1.0.0 =
* First release.

== Upgrade Notice ==

= 1.0.0 =
First release.
