WP Manifestindependent plugin directory
manifest / ecommerce / advanced-discounts

Advanced Discounts

Automatically apply category-based and coupon-based discounts with conditional logic.

★ 0stars

Install

Download source zip No release zip yet

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

  1. Upload advanced-discounts folder to /wp-content/plugins/.
  2. Activate plugin from WordPress admin.

Hooks Used

  • woocommerce_cart_calculate_fees → apply discounts
  • wp_get_post_terms → check product category
  • WC_Cart::add_fee → display discount
  • admin_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