=== Wholesale Price Groups for WooCommerce ===
Contributors: acreativestudio
Tags: wholesale, woocommerce, b2b, price groups, discount
Requires at least: 6.0
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

Sell the same products at different prices to different customers. Create wholesale groups with your own names and a discount for each one.

== Description ==

**Wholesale Price Groups for WooCommerce** lets you offer different prices to different customers without duplicating your products.

You create as many price groups as you need, with any name you like ("Gold wholesaler", "Reseller", "Partner"...), give each one a discount, and assign your customers to the group that fits them. When a customer who belongs to a group logs in, every price in your shop changes for them: catalogue, product page, cart, checkout and order total.

Customers without a group, and visitors who are not logged in, keep seeing your normal prices.

= Features =

* **Unlimited price groups** with names you choose. Rename or remove them at any time.
* **Global discount for each group**, applied to the standard price of every product.
* **Manual assignment**: you decide which customer belongs to which group, from the user's edit page. A column in the users list shows the group at a glance.
* **Fixed price and extra discount on each product**, for each group, to handle the exceptions.
* **Variable products supported**: set the fixed price and extra discount on every single variation. The "from X to Y" price range is correct for each group.
* **Private by design**: customers never see their group, the group names or any wholesale setting. Everything is reserved to shop managers.
* **Built-in guide** in WordPress, in English and Italian.
* **Compatible** with WooCommerce High-Performance Order Storage (HPOS).
* Translated into Italian. Ready for other translations.

= How the price is calculated =

For a customer in a group, the plugin applies the first rule that matches:

1. The **fixed price** set on the product (or variation) for that group.
2. The **global discount** of the group, followed by the **extra discount** of the product, if any.
3. Otherwise, the standard price.

Orders keep the price applied when they were placed, so later changes never alter past orders.

= Need more? =

A **Pro version** is available for shops that manage wholesalers every day. It adds offer start and end dates, quantity discounts, personal prices for single customers, minimum order and allowed payment and shipping methods for each group, CSV import and export, wholesaler registration with approval, and business fields (company name, VAT number and more) at registration and checkout. A full comparison is shown in WooCommerce → Wholesale Pro, inside the plugin.

= Requirements =

* WordPress 6.0 or later
* WooCommerce (active)
* PHP 7.4 or later

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/`, or install it from the Plugins screen in WordPress.
2. Activate the plugin. WooCommerce must be active.
3. Go to **WooCommerce → Settings → Wholesale** and create your first group.
4. Go to **Users**, edit a customer and choose the group in **Wholesale pricing**.
5. Optional: open a product and use the **Wholesale prices** tab (or the variation fields) to set a fixed price or an extra discount for a group.

The full guide is available in **WooCommerce → Wholesale guide**.

== Frequently Asked Questions ==

= Do customers see the name of their group? =

No. Customers never see their group, the group names, or that groups exist. Only shop managers and administrators can see and change them.

= Why does a customer still see the normal prices? =

The customer must be logged in and assigned to a group. The group needs a global discount above 0, or the product needs its own fixed price or extra discount. If you use a caching plugin, make sure pages are not cached for logged-in users.

= Why do I see the normal price in the product editor? =

On purpose: in the admin area you always see the real prices so you can edit them safely. Check the discounted prices from a customer account.

= Can a customer belong to more than one group? =

No. Each customer has one group at a time.

= Does it work with variable products? =

Yes. Fixed price and extra discount can be set on each variation, and the price range is calculated correctly for each group.

= What happens to my data if I deactivate the plugin? =

Groups, product prices and assignments stay saved. Prices go back to normal for everyone until you activate the plugin again.

= Can I restrict the settings to administrators only? =

Yes. By default, shop managers and administrators have access. You can restrict it with the `acwpg_admin_capability` filter, for example:

`add_filter( 'acwpg_admin_capability', function () { return 'manage_options'; } );`

= Is it compatible with HPOS? =

Yes. The plugin declares compatibility with High-Performance Order Storage.

= Does it work with my theme and page builder? =

The plugin changes the prices through WooCommerce filters, so it works with any theme or builder that displays prices in the standard WooCommerce way.

== Screenshots ==

1. Create price groups with your own names and a global discount for each one.
2. Set a fixed price or an extra discount for each group on every product.
3. Assign a customer to a price group from the user's profile.
4. Variable products: set the prices on each variation.

== Privacy ==

This plugin does not collect, send or share any personal data and does not connect to external services. The only information it stores is the price group chosen by the shop manager for each user, saved in your own WordPress database.

== Changelog ==

= 1.0.0 =
* First public release.

== Upgrade Notice ==

= 1.0.0 =
First public release.
