Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/m-haris-dev/advanced-discounts/archive/refs/heads/main.zipNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
Advanced Discounts WooCommerce Plugin
Description
Automatically applies category-based and coupon-based discounts with conditional logic.
Features
- 15% discount on Electronics category products
- Only applies if cart subtotal > 200 or user logged in
- Shows discounts as a negative fee in cart/checkout
- Modular class-based design
Installation
- Upload
advanced-discountsfolder to/wp-content/plugins/. - Activate plugin from WordPress admin.
Hooks Used
woocommerce_cart_calculate_fees→ apply discountswp_get_post_terms→ check product categoryWC_Cart::add_fee→ display discountadmin_menu→ plugin info page
Notes
- Currently only works for category named
Electronics - Admin page includes instructions for category setup
- Easy to extend for multiple categories and conditional rules