=== Yay Wholesale B2B for WooCommerce ===
Contributors: YayCommerce
Tags: wholesale, b2b, wholesale pricing, discount rules, sale
Requires at least: 3.0
Tested up to: 7.0
Stable tag: 1.1.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Create multiple wholesale roles, offer wholesale pricing, manage B2B customers, and track wholesale performance effectively.

## Description

WooCommerce treats all customers the same by default.

That’s fine for simple stores, but it quickly becomes a problem when you sell **wholesale**, **B2B**, or use **tiered pricing**.

When you need different prices, **minimum order quantities**, or exclusive products for specific customers, things get complicated fast.

Yay Wholesale B2B for WooCommerce gives you full control: Create wholesale roles, set custom pricing rules, tailor prices and taxes for B2B customers.

💫Check it out: **[Yay Wholesale B2B Pro for WooCommerce](https://yaycommerce.com/yay-wholesale-b2b-for-woocommerce/)** 👀

Ready to run retail and wholesale from one WooCommerce store? Start now to manage wholesale customers and B2B rules that make sense for your business.

## Key Features

### Wholesale Customer Management
- **Registration System**: Customizable registration forms with flexible field configuration
- **Role-Based Pricing**: Create unlimited wholesale roles with different discounts
- **Request Moderation**: Review and approve/reject wholesale applications

### Analytics Dashboard
- **Performance Metrics**: Track total wholesalers, orders, and revenue
- **Time-Based Comparison**: Compare performance across custom date ranges
- **Top Performers**: View top 10 wholesale customers and best-selling products
- **Growth Indicators**: See percentage changes compared to previous periods

### B2B Requirements Display
- **Progress Tracking**: Show customers their progress toward wholesale pricing (Pro)
- **Conditional Display**: Appears in mini-cart, cart, and checkout (Pro)
- **Block Integration**: Add requirement widgets to any page (Pro)

## Installation

1. Upload the plugin files to `/wp-content/plugins/yay-wholesale/`
2. Activate the plugin through the 'Plugins' menu in WordPress
3. Navigate to YayWholesale in your WordPress admin to configure settings
4. A default wholesale role will be created automatically upon activation

## Getting Started

### Setting Up Registration
1. Go to **YayWholesale > Settings > Registration**
2. Configure moderation settings and form messages
3. Customize registration fields under **Registration Fields**
4. Add the registration form to a page using:
   - Shortcode: `[ywhs_request_form title="optional"]`
   - Block: "Request Registration Form Block"

### Creating Wholesale Roles
1. Navigate to **YayWholesale > Roles**
2. Click "Add New Role" to create custom wholesale tiers
3. Configure pricing and requirements for each role

### Managing Requests
1. View pending requests at **YayWholesale > Requests**
2. Review customer information and approve or reject applications
3. Assign specific roles during approval if needed

### Configuring Prices
1. Go to **YayWholesale > Settings > Display**
2. Choose your price display format
3. Customize the wholesale price label
4. Select a color for wholesale pricing

### Customizing Emails
Configure automated email notifications:

- New wholesale order placed (to admin)
- New wholesale account registered (to admin)
- Wholesale account approved (to customer)
- Wholesale account rejected (to customer)
- Wholesale account pending review (to customer)

## Frequently Asked Questions

**Can customers have multiple wholesale roles?**
No, each wholesaler is assigned one role at a time. Approving a new request overrides the previous role.

**What happens to pending requests after approval?**
Approved requests are removed from the Requests screen and the customer appears in the Wholesalers list.

**Can I disable the default role?**
No, the default role cannot be deactivated or deleted. It always appears first in the roles list.

**Do wholesale orders calculate taxes?**
You can enable/disable tax calculations for wholesale orders in Settings > General.

**Can wholesalers use coupons?**
You can enable/disable coupon functionality for wholesale orders in Settings > General.

## Support

For documentation, support, and updates, visit our website or [contact YayCommerce support team](http://yaycommerce.com/support/).

## Changelog

= Jun 3, 2026 - Version 1.1.0 =
- Improved: The registration field settings to allow special characters.
- Added: Support for preventing checkout when a wholesaler has not met the MOV requirement.
- Added: The ability to display prices including or excluding tax for wholesalers.
- Added: Support for configuring shipping methods by user role.
- Added: Support for configuring payment methods by user role.
- Added: The ability to set a fixed price or percentage discount per product.
- Added: The ability to set a percentage discount per category.
- Added: Compatible with WooCommerce 10.8

= Mar 17, 2026 - Version 1.0.5 =
- Fixed: Bugs from admin notice
- Updated: Requirements progress bar (Pro version)

= Mar 13, 2026 - Version 1.0.4 =
- Updated: Plugin logo in admin dashboard
- Improved: Recommended plugins screen
- Improved: Licenses screen (Pro version)

= Jan 29, 2026 - Version 1.0.2 =
- Update permission callback for API
- Implement submission rate limit for wholesale submit form
- Refactor plugin prefix

= Jan 12, 2026 - Version 1.0.0 =
- Initial release