WP Manifestindependent plugin directory
manifest / ecommerce / woo-discount-manager

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.zip

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.

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

  1. Download: Download the repository as a ZIP file.
  2. Upload: Go to your WordPress Admin -> Plugins -> Add New -> Upload Plugin.
  3. Alternatively: Upload the woo-discount-manager folder to your /wp-content/plugins/ directory via FTP.
  4. Activate: Activate the plugin through the 'Plugins' menu in WordPress.

Quick Start

  1. Navigate to Discount Manager in your WordPress admin sidebar.
  2. Click Add New to create your first rule.
  3. Enter a name (e.g., "Summer Sale 10%").
  4. Select Percentage as the type and enter 10.
  5. Choose Apply To: All Products.
  6. Set Status to Active and click Save Rule.
  7. 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 bloating wp_options.
  • Security: Includes Nonce verification, capability checks (manage_options), and data sanitization/escaping.

Author

Zeeshan Shaikh

License

This project is licensed under the GPLv2 or later.