=== Orvixa B2B Commerce for WooCommerce ===
Contributors: orvixacode
Tags: woocommerce, b2b, wholesale, wholesale pricing, b2b pricing
Requires at least: 6.5
Requires PHP: 7.4
Requires Plugins: woocommerce
Tested up to: 7.1
Stable tag: 0.11.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Add dealer registration, approval, per-dealer pricing, catalogs and bank-transfer workflows to WooCommerce.

== Description ==

Orvixa B2B Commerce is a modular B2B and wholesale solution for WooCommerce. The current Free package helps store owners manage dealer registrations, manual approvals, per-dealer discounts, dealer catalog access, selected product showcases and a bank-transfer workflow without depending on a particular theme.

Use Orvixa B2B Commerce to run dealer, distributor, reseller or wholesale customer programs directly from WooCommerce. Orvixa B2B Commerce uses WooCommerce product templates so compatible themes, including WoodMart, can continue controlling product-card presentation.

== Key Features ==

= Dealer Management =

* Public dealer application with company and contact information.
* Private application records excluded from REST and public search.
* Manual approve or reject workflow.
* Approved dealer role with Pending, Approved, Restricted, Suspended, Rejected and Archived statuses.
* Central catalog, price, ordering, request and EFT permissions.
* Frontend dealer portal with product, price, discount, stock and new-product views.
* Dealer wishlist and private request/reply conversations.

= B2B Pricing =

* Global default dealer discount.
* Per-dealer discount percentage.
* Runtime pricing that does not overwrite stored WooCommerce product prices.
* Discount and base-price snapshots on order line items.

= Catalog and Product Showcases =

* Approved-dealer catalog.
* Deal-product and outlet-product selections.
* Gutenberg block plus Elementor and WPBakery components when those editors are active.

= B2B Payments =

* Select which installed WooCommerce payment methods approved dealers may use.
* Dealer-only bank transfer with a selectable WooCommerce-supported settlement currency.
* Manual settlement exchange rate locked on each order.
* Dealer payment notification without receipt uploads.
* Manual bank verification before an authorized user confirms payment.

= Store Setup and Support =

* Quick Setup launches the complete Core workflow without requesting financial details.
* Advanced Setup configures applications, notifications, storefront pages, catalog layout, dealer pricing, merchandising placement and optional Dealer EFT.
* Help & Feedback center with separate feature, bug and private security routes.
* Optional sanitized system information that is OFF by default.

== Who Is Orvixa B2B Commerce For? ==

Orvixa B2B Commerce is intended for WooCommerce stores that approve business customers and offer account-specific pricing, dealer catalogs or manual bank-transfer settlement. B2C customers and approved dealers can use the same store; dealer-only pricing and payment behavior applies only to approved dealer accounts.

== Free and Pro ==

The Free package includes the workflows listed above and remains useful without a paid license. Orvixa B2B Commerce Pro adds product/category rules, Customer Groups, tier pricing and minimums, Quick Order with validated CSV, Purchase Lists, snapshot-based Quotes, Company Accounts, advanced CSV import/export, a versioned REST API, signed asynchronous webhooks, editor components and an auditable referral program.

== Getting Started ==

1. Activate Orvixa B2B Commerce with WooCommerce active.
2. Choose Quick Setup for safe Core defaults or Advanced Setup for operational control.
3. Review the separate application, catalog, Deals and Outlet pages.
4. If needed, configure dealer pricing and deliberately enable Dealer EFT with a verified exchange rate and beneficiary instructions.
5. Test the complete workflow on a staging site before production use.

== Installation ==

1. Install and activate WooCommerce.
2. Upload the Orvixa B2B Commerce ZIP from Plugins > Add New, or copy the plugin directory to `/wp-content/plugins/`.
3. Activate Orvixa B2B Commerce for WooCommerce.
4. Complete the setup wizard.
5. Test registration, approval, pricing and payment confirmation with test accounts and orders.

== Shortcodes ==

* `[orvixa_b2b_registration]` - public dealer application.
* `[orvixa_b2b_catalog]` - approved-dealer catalog.
* `[orvixa_b2b_dealer_portal]` - dealer overview, products, wishlist and private requests.
* `[orvixa_b2b_deals]` - selected deal products.
* `[orvixa_b2b_outlet]` - selected outlet products.
Product lists accept bounded `limit`, `columns`, `orderby` and `order` attributes. The catalog also supports `paginate="true"`. Premium shortcodes are shipped only in the separately distributed Pro package and are not present or locally locked in this Free package.

== Privacy and External Services ==

Dealer applications store company name, tax ID, contact name, email, phone, address, consent time, status and reviewer information in the site's WordPress database. Dealer wishlists are stored on the dealer account. Dealer requests and authenticated replies are stored as private request records and typed comments. EFT notifications store a transaction reference and optional note on the WooCommerce order. Orvixa B2B Commerce does not request payment receipts, online-banking credentials or API keys.

The Help & Feedback page makes no request merely by being opened. When the product owner has configured a feedback recipient, an authorized administrator can explicitly email a feature request or bug report through the site's WordPress mail transport. The page discloses the recipient and fields before submission. Optional system information defaults to OFF and contains only software versions, theme name/version, HPOS state, setup state and supported-editor availability.

The plugin can send operational email through the site's configured WordPress mail transport after a specific user action: a new dealer application to the configured store notification address; an approval/rejection notice to the applicant; an EFT report to the store address; dealer-request notifications to the store or replying dealer; and an explicitly submitted Help & Feedback message to the recipient shown on screen. These messages contain only the data needed for that workflow. No email is sent merely by viewing an admin or frontend page.

Licensing, checkout, subscriptions and Premium updates use the bundled Freemius WordPress SDK. Anonymous mode is not enabled. Telemetry and usage tracking are OFF until an administrator explicitly opts in through the Freemius consent flow or deliberately starts license activation. After consent, Freemius may receive the site URL, WordPress/PHP/plugin versions, locale, administrator identity/contact fields disclosed by its consent screen, and license/subscription identifiers needed to provide licensing and updates. Clicking Upgrade may open a Freemius-hosted checkout. The plugin contains the public Product ID and public integration key required by the SDK, but no Freemius Secret Key. No Google Analytics code is added by Orvixa B2B Commerce to WordPress administration. See https://freemius.com/privacy/ and https://freemius.com/terms/.

Site owners must provide an appropriate privacy notice, select a lawful retention period and handle applicable data access or deletion requests.

== Frequently Asked Questions ==

= What is Orvixa B2B Commerce? =

Orvixa B2B Commerce is a modular B2B and wholesale plugin for WooCommerce. This release focuses on dealer registration, approval, per-dealer pricing, catalogs and a manually verified bank-transfer workflow.

= Can I run B2B and B2C customers in the same WooCommerce store? =

Yes. Ordinary customers keep the standard store experience. Dealer pricing, dealer catalog access and Dealer EFT availability require an approved dealer account.

= Can customers apply for wholesale accounts? =

Yes. Add the dealer-application shortcode, block or supported editor component to a page. Applications remain private until a permitted store manager reviews them.

= Can I create different wholesale customer groups? =

Yes in Pro. Groups are independent of WordPress roles, support one primary plus optional additional memberships, and use deterministic priority.

= Can I hide WooCommerce prices from guests? =

Not in this release. The dealer catalog is restricted, but normal WooCommerce catalog visibility is not changed globally.

= Can I set different WooCommerce prices for B2B customers? =

Approved dealers can receive individual percentage discounts. The calculation runs at display/cart time and does not overwrite product prices in the database.

= Does Orvixa B2B Commerce support quantity-based wholesale pricing? =

Yes in Pro. Fixed-price and percentage tiers support customer, group, product, variation, category and global scopes, with server-side cart and checkout recalculation.

= Does Orvixa B2B Commerce work with WoodMart? =

Orvixa B2B Commerce has no WoodMart dependency and uses standard WooCommerce templates and APIs. Final release claims require regression testing against the specific WoodMart version used by the store.

= Does Orvixa B2B Commerce require WoodMart? =

No. It is designed to work with standards-compliant WooCommerce themes.

= Does Orvixa B2B Commerce support Elementor, Gutenberg and WPBakery? =

The current package contains a Gutenberg dynamic block, four Elementor widgets and four WPBakery elements. Elementor and WPBakery integrations load only when those editors are active.

= Does Orvixa B2B Commerce support WooCommerce HPOS? =

Yes. The plugin declares HPOS compatibility, uses WooCommerce order CRUD APIs and is covered by integration tests with HPOS both enabled and disabled.

= Does Orvixa B2B Commerce support WooCommerce Cart and Checkout Blocks? =

Yes. Dealer EFT supports both Classic Checkout and WooCommerce Checkout Blocks.

= Can I display prices in one currency and collect payment in another? =

Dealer EFT can lock a manually configured settlement rate between the WooCommerce order currency and a selected WooCommerce-supported settlement currency. Standard payment gateways continue using their normal WooCommerce currency behavior; Orvixa B2B Commerce is not a general storefront multi-currency system.

= Can dealers report bank-transfer payments? =

Yes. The authenticated order owner can submit a transaction reference and optional note. The order remains on hold until an authorized store user verifies the bank account and confirms payment.

= Does the support page transmit data automatically? =

No. Feedback is sent only after an authorized administrator completes a form, reviews the disclosed destination, explicitly consents and presses Send. Optional system information defaults to OFF.

== Screenshots ==

1. Review pending dealer applications and approve or reject them from a protected workflow.
2. Manage approved dealers and set an individual wholesale discount without changing product records.
3. Configure pricing and a rate-locked Dealer EFT settlement currency.
4. Show approved dealers a theme-compatible WooCommerce product catalog.
5. Let a dealer report a transfer while keeping payment confirmation under store control.
6. Add Orvixa B2B Commerce content through Gutenberg, Elementor or WPBakery.
7. Complete Quick or Advanced setup according to the store's needs.
8. Send feature requests or bug reports with transparent, opt-in system information.

== Changelog ==

= 0.11.2 =

* Fixed blank or unregistered Upgrade destinations in Freemius SDK 2.13.4 activation states.
* Centralized Orvixa-owned Upgrade links through the official product-scoped `pricing_url` filter and checkout renderer.
* Added visible checkout recovery states and kept licensed Premium users out of unnecessary upgrade flows.

= 0.11.1 =

* Restored early capability self-healing for custom or renamed administrator roles that have `manage_options`.
* Reconciled missing B2B capabilities even when the stored capability schema is already current.
* Added ankod.com regression coverage for the main admin menu and Setup Wizard.
* Improved the first-run Setup Wizard flow and redirected new interactive installations to the registered wizard once.
* Kept completed setups intact during deactivation and reactivation.
* Improved reusable admin status, note, action, percentage and unit control sizing and alignment.
* Normalized dot and comma decimal input safely before storing percentage and exchange-rate values.
* Fixed responsive Dealer Management layout on mobile devices.
* Improved responsive admin forms and permissions.
* Added complete WordPress internationalization coverage.
* Added translations/locales for major WordPress markets.

= 0.11.0 =

Security and compliance:
* Physically separated all locally executed Premium modules from the WordPress.org Free package.
* Kept Core administration, setup, pricing and dealer workflows fully usable without a license.
* Disabled anonymous Freemius mode so external telemetry requires an explicit administrator opt-in.
* Centralized request-method enforcement and hardened authorization, ownership, upload and output handling.
* Documented operational email and external-service behavior in the Privacy and External Services section.

= 0.7.0 =

Changed:
* Rebuilt Quick Setup around useful, finance-free Core defaults.
* Expanded Advanced Setup into real application, notification, catalog, pricing, merchandising, editor and EFT controls.
* Added separate Deals and Outlet pages plus optional idempotent placement on an existing page.
* Connected wizard choices to the application, storefront and payment modules.

= 0.6.7 =

Fixed:
* Rebuilt the install archive with portable ZIP entry separators so WordPress detects exactly one plugin root.
* Prevented temporary upload-folder names from leaking into the activation basename.

= 0.6.6 =

Fixed:
* Corrected the Freemius Free-to-Pro basename handoff so only one Orvixa B2B Commerce runtime can load.
* Removed forced first-run licensing and added an explicit Orvixa B2B Commerce License screen.
* Replaced the sidebar image with WordPress's correctly sized bold B icon.

= 0.6.5 =

Fixed:
* Allowed renamed/custom Administrator roles with `manage_options` to inherit Orvixa B2B Commerce capabilities.
* Advanced the capability schema so existing installations self-heal after ZIP replacement.
* Added current role keys to opt-in private admin diagnostics.

= 0.6.4 =

Fixed:
* Made the Free/Core bootstrap explicitly independent from Freemius entitlement state.
* Refreshed current-user capabilities immediately after schema migration.
* Added an Administrator runtime capability guarantee for cached first requests.
* Added isolated Free, unlicensed Premium, licensed Premium, and expired-license bootstrap tests.

= 0.6.3 =

Fixed:
* Replaced the oversized admin-menu artwork with a restrained 16px bold B mark.
* Hardened manual Premium packaging checks to require one canonical plugin root and one plugin header.

= 0.6.2 =

Fixed:
* Added a self-healing capability schema that does not depend on reactivation.
* Kept the Orvixa B2B Commerce admin bootstrap available when WooCommerce dependency detection is delayed.
* Verified main-menu and Setup Wizard registration through automated bootstrap tests.
* Added opt-in, development-only private diagnostic logging for admin bootstrap checks.

= 0.6.1 =

Fixed:
* Setup Wizard and all public Orvixa B2B Commerce admin URLs now use registered `orvixa-b2b-*` slugs.
* Activation waits until the Setup submenu is registered before redirecting.
* Administrator capabilities are reconciled during activation and version upgrades.

= 0.6.0 =

Added:
* Vendored Freemius WordPress SDK 2.13.4 and early production initialization.
* Central Feature Manager for paid entitlements and Premium module loading.
* Free/Pro basename registration so activation replaces the conflicting build.
* Developer-safe Free fallback when the SDK is unavailable locally.

Improved:
* Product slug, text domain, and main admin menu now use `orvixa-b2b-commerce`.
* Premium code remains isolated under `includes/premium/`.

= 0.5.0 =

Added:
* A restrained Orvixa B2B Commerce admin design system based on the supplied B2B icon palette.
* Branded page headers, dashboard counters, status badges, setup choices, and responsive tables.
* Scoped Orvixa B2B Commerce styling for dealer applications, pricing, and bank-transfer panels.
* Lightweight SVG brand marks for the admin menu and Orvixa B2B Commerce screens.

Improved:
* Help & Feedback now follows the same accessible interface system.
* Admin styles load only on Orvixa B2B Commerce screens and frontend styles only with Orvixa B2B Commerce components.

See `changelog.txt` for earlier development history.
