WooCommerce Discount Manager
A robust and lightweight WordPress plugin to manage automatic discount rules for WooCommerce products, categories, and user roles. Features include sale badges, strikethrough prices, and a user-friendly admin interface.
by Zeeshan · github.com/zeeshan-sshaikh/woo-discount-manager
★ 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/zeeshan-sshaikh/woo-discount-manager/archive/refs/heads/main.zipA robust and lightweight WordPress plugin to manage automatic discount rules for WooCommerce products, categories, and user roles. Features include sale badges, strikethrough prices, and a user-friendly admin interface.
Features
- Custom Discount Rules: Create rules based on products, categories, or all items.
- Rule Types: Supports both fixed amount and percentage-based discounts.
- Bulk Pricing: Set minimum quantity requirements for discounts.
- User Role Targeting: Limit discounts to specific user roles (e.g., Wholesale, Customer).
- Scheduling: Set start and end dates for automatic discount application.
- Visual Cues: Automatically displays "SALE" badges and strikethrough prices on the frontend.
- Clean UI: Built with WordPress-standard list tables and modern AJAX-driven forms.
Prerequisites
- WordPress: 6.0 or higher
- WooCommerce: 8.0 or higher
- PHP: 8.1 or higher
- MySQL: 5.7 or higher (supports custom tables)
Installation
- Download: Download the repository as a ZIP file.
- Upload: Go to your WordPress Admin -> Plugins -> Add New -> Upload Plugin.
- Alternatively: Upload the
woo-discount-managerfolder to your/wp-content/plugins/directory via FTP. - Activate: Activate the plugin through the 'Plugins' menu in WordPress.
Quick Start
- Navigate to Discount Manager in your WordPress admin sidebar.
- Click Add New to create your first rule.
- Enter a name (e.g., "Summer Sale 10%").
- Select Percentage as the type and enter
10. - Choose Apply To: All Products.
- Set Status to Active and click Save Rule.
- Visit your shop frontend to see the discounted prices and sale badges!
Configuration
Go to Discount Manager -> Settings to customize:
- Show/Hide Discount Badge.
- Change the Badge Text (e.g., "OFFER", "DEAL").
Technical Overview
- Architecture: Follows Spec-Driven Development (SDD) principles.
- Autoloader: Custom PSR-4 compliant autoloader mapped to WordPress file naming conventions (
class-wdm-*.php). - Database: Uses a custom MySQL table (
wp_wdm_rules) for efficient rule processing without bloatingwp_options. - Security: Includes Nonce verification, capability checks (
manage_options), and data sanitization/escaping.
Author
Zeeshan Shaikh
- GitHub: zeeshan-sshaikh
License
This project is licensed under the GPLv2 or later.