=== Bizmart ===
Contributors: bizmart
Tags: woocommerce, inventory, analytics, dashboard, purchase-price
Requires at least: 5.8
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 2.1.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Analytics dashboard, purchase price tracking, and product management for WooCommerce stores.

== Description ==

Bizmart adds a powerful analytics dashboard, purchase price management, and inventory metrics to your WooCommerce store. Track margins, profits, and stock valuations without leaving the WordPress admin.

**Core Features:**

* **Analytics Dashboard** - Sales, profit, and margin metrics with date-range filtering and Chart.js graphs.
* **Product Management** - Purchase price meta for all product types (simple, variable, grouped, external, digital). Inline editing, AJAX product creation, and background import with progress tracking.
* **Inventory Metrics** - Real-time stock valuation using purchase prices, with variation-aware calculations and weighted average cost (WAC) support.
* **Settings Engine** - Company info, expense categories, import preset builder, and per-option caching.
* **Trilingual UI** - English, French, and Arabic with RTL-ready admin styles and lazy-loaded translation dictionaries.
* **Addon API** - Hooks and helper functions for extending Bizmart with addon plugins (Invoices, Suppliers, Finance).

**Requirements:**

* WordPress 5.8+
* WooCommerce 5.0+
* PHP 7.4+

== Installation ==

1. Upload the `bizmart-core` folder to `/wp-content/plugins/`.
2. Activate the plugin through the **Plugins** menu in WordPress.
3. Navigate to **Bizmart > Settings** to configure your company details.
4. Install any Bizmart addon plugins as needed for Invoices, Suppliers, and Finance features.

== Frequently Asked Questions ==

= Does Bizmart require WooCommerce? =

Yes. Bizmart extends WooCommerce with purchase prices, margin calculations, and an analytics dashboard. WooCommerce must be installed and active.

= Which product types are supported? =

Simple, Variable (with per-variation purchase prices), Grouped, External, and Digital/Downloadable products are all supported.

= Does Bizmart work with RTL languages? =

Yes. The admin UI is fully RTL-ready and includes built-in Arabic translations.

= Where is the data stored? =

Bizmart creates its own database tables (prefixed with bizmart_) for products, expenses, suppliers, invoices, payments, and price history. All tables are cleaned up on uninstall.

== Screenshots ==

1. Analytics Dashboard with sales, profit, and margin metrics.
2. Products page with inline price editing.
3. Company Settings page.

== Changelog ==

= 2.1.0 =
* Feature: Products with stock management OFF but status in stock counted as qty=1 in metrics.
* Performance: Cache key bumped to v9 with automatic legacy cleanup.
* i18n: Complete Arabic translations (321 strings).
* Security: Capability checks on all form handlers.
* Security: Proper output escaping on all admin pages.

= 2.0.0 =
* Security: Unified nonce verification with backward compatibility.
* Performance: Lazy-load Arabic translations, static option cache.
* Architecture: Extracted shared helpers, addon API, activation/deactivation hooks.

= 1.1.0 =
* Initial release with Dashboard, Settings, and Product Management.

== Upgrade Notice ==

= 2.1.0 =
Security improvements and Arabic translation updates. Recommended for all users.