manifest / unclassified / wp-custom-plugin-wholesale-management
WooCommerce Wholesale Management
A complete wholesale solution for WooCommerce that handles registration, roles, and pricing for wholesale customers.
by Tíňa Poláková · github.com/polakova/wp-custom-plugin-wholesale-management · website
★ 0stars
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/polakova/wp-custom-plugin-wholesale-management/archive/refs/heads/main.zipA complete wholesale solution for WooCommerce that handles registration, roles, and pricing for wholesale customers.
Features
1. Wholesale Roles
- Wholesale Role: For approved wholesale customers
- Pending Role: For customers awaiting approval
2. Wholesale Registration
- Custom registration form with checkbox for wholesale registration
- Additional required fields:
- Company name (required)
- IČO (required)
- DIČ (optional)
- IČ DPH (optional)
- Automatic role assignment to "pending" upon registration
- Email notifications:
- Customer receives confirmation email
- Admin receives notification of new wholesale registration
- Approval/denial emails when role is changed
3. Wholesale Pricing
- Wholesale price fields for simple and variable products
- Automatic price display based on user role
- Cart price adjustments for wholesale customers
- Admin settings to choose price display type in orders
- Special handling for products with professional tag (configurable via filter)
4. Admin User Creation
- Shortcode
[admin_user_create]for administrators - Create users with extended billing and shipping fields
- Support for both wholesale and customer roles
- Optional email notification with password reset link
Installation
- Upload the plugin files to
/wp-content/plugins/wc-wholesale-management/ - Activate the plugin through the 'Plugins' menu in WordPress
- Ensure WooCommerce is installed and active
Usage
Registration
Wholesale customers can register through the standard WooCommerce registration form. When they check "Chcem sa registrovať ako veľkoobchodný zákazník", additional fields will appear.
Admin Approval
- Go to Users in WordPress admin
- Find users with "Čaká na schválenie" role
- Change their role to "Veľkoobchodník" to approve or "Customer" to deny
- User will receive an email notification
Setting Wholesale Prices
- Edit a product in WooCommerce
- For simple products: Find "Veľkoobchodná cena (€)" field in General tab
- For variable products: Find "Veľkoobchodná cena (€)" field in each variation
- Enter the wholesale price
Admin Settings
- Go to WooCommerce > Settings > Products
- Find "Zobrazenie veľkoobchodnej ceny" section
- Choose whether to display regular or wholesale prices in admin orders
Admin User Creation
Use the shortcode [admin_user_create] on any page to display a form for creating users with extended fields.
File Structure
wc-wholesale-management/
├── wc-wholesale-manager.php (Main plugin file)
└── includes/
├── class-wc-wholesale-helpers.php (Shared helper functions)
├── class-wc-wholesale-roles.php (Role management)
├── class-wc-wholesale-registration.php (Registration handling)
├── class-wc-wholesale-pricing.php (Pricing functionality)
└── class-wc-wholesale-admin.php (Admin functions)
Requirements
- WordPress 5.0+
- WooCommerce 4.0+
- PHP 7.2+
Notes
- The plugin uses Slovak language strings by default
- All wholesale logic has been extracted from the theme's functions.php
- Old plugin files (wc-wholesale-prices.php, wc-wholesale-registration.php) have been removed