=== Kns Dynamic Discounts for WooCommerce ===
Contributors: knsapp
Tags: woocommerce, discounts, dynamic pricing, bogo, bulk discounts
Requires at least: 5.8
Tested up to: 6.9
Requires PHP: 7.4
Requires Plugins: woocommerce
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A flexible WooCommerce discount plugin with BOGO campaigns, tiered quantity pricing, customer segmentation, usage limits, and scheduling.

== Description ==

**Kns Dynamic Discounts for WooCommerce** is a powerful and flexible discount management system that helps you create complex promotional campaigns without any coding knowledge. From simple percentage discounts to sophisticated BOGO offers and tiered pricing structures, this plugin handles it all.

Whether you're running flash sales, rewarding loyal customers, or implementing bulk purchase incentives, Kns Dynamic Discounts provides the tools you need to boost your sales and customer engagement.

= Free Version Limits =

The free version includes fixed/quantity discount groups with the following limits:

* Maximum **1** group
* Maximum **3** rules per group

Features marked with **PRO** in the admin UI (such as import/export and certain advanced campaign/limit capabilities) require the Pro version.

= 🎯 Campaign Types =

**Tiered/Quantity-Based Discounts (Fixed Discount Groups)**
Create sophisticated bulk pricing structures where customers get better prices as they buy more:

* Percentage discounts (e.g., 10% off when buying 5+ items)
* Fixed amount discounts (e.g., $5 off per item when buying 10+)
* Multiple tiers per product or category

**Special Campaign Types**

* **BOGO (Buy One Get One)** - Classic buy X get Y free offers
* **Buy X Get Y** - Purchase specific products to receive different products free or discounted
* **Cart Discounts** - Apply discounts based on cart total or item count
* **Category-wide Campaigns** - Apply offers across entire product categories
* **Product-specific Offers** - Target individual products with special pricing

= 👥 Customer Targeting & Segmentation =

* **User Role Targeting** - Different discounts for different customer roles
* **Guest vs Logged-in** - Separate offers for guests and registered users
* **First-Order Discounts** - Special pricing for new customers
* **Member-Only Offers** - Exclusive deals for registered members

= ⚙️ Usage Limits & Controls =

* **Total Usage Limit** - Set maximum number of times a discount can be used
* **Per-Customer Limit** - Limit usage per individual customer
* **Member-Only Limits** - Separate limits for logged-in customers
* **Email-Based Tracking** - Track usage even for guest customers
* **Real-time Usage Counter** - See exactly how many times each offer has been used

= 📅 Scheduling & Date Management =

* **Start/End Dates** - Schedule campaigns to run automatically
* **Date Conflict Detection** - Automatic warnings when date ranges overlap
* **Lock Started Campaigns** - Prevent accidental changes to active promotions
* **Single-Day Campaigns** - Support for flash sales and daily deals
* **Flexible Date Formats** - Multiple display format options

= 🎨 Frontend Display Options =

**Product Page**
* Tier pricing table with customizable position
* Campaign messages with dynamic content
* Force position option for theme compatibility
* Multiple location choices (above price, before/after button, in summary)

**Cart & Checkout**
* Inline discount messages under products
* Block area messages near totals
* Strikethrough original prices
* Mini cart support

**Styling**
* 6 color theme presets
* Custom color picker
* Responsive design
* RTL support ready

= 🔧 Admin Features =

**Group Management**
* Organize rules into logical groups
* Pause/Resume groups instantly
* Clone existing groups
* Drag-and-drop ordering

**Rule Editor**
* Visual rule builder
* Real-time validation
* Conflict detection
* Category/Product search with autocomplete

**Settings**
* Global enable/disable switch
* Language selection (auto or manual)
* Customizable warning themes
* Accessibility options (ARIA roles)
* Performance tuning options

= 🔔 Smart Notifications =

Stay ahead of your campaigns with intelligent alerts:

* **Expiring Soon** - Get warnings before campaigns end
* **Just Started** - Know when campaigns go live
* **Quick Actions** - Extend dates and manage rules directly
* **Non-intrusive** - Notifications panel that doesn't interrupt workflow

= 🚀 Performance & Compatibility =

* **HPOS Compatible** - Works with WooCommerce High-Performance Order Storage
* **Cache-Friendly** - Optimized for caching plugins
* **Lightweight** - Minimal database queries
* **Object Caching** - Redis/Memcached support
* **Batch Loading** - Efficient data retrieval

= 🌐 Internationalization =

* Full translation ready with POT file
* Currently available in English and Turkish
* Automatic browser language detection
* Manual language override option

= 🔒 Security =

* All inputs sanitized and validated
* Database queries use prepared statements
* WordPress native security functions
* Regular security audits

== Installation ==

1. Upload the plugin folder to the `/wp-content/plugins/` directory, or install the plugin through the WordPress Plugins screen.
2. Activate the plugin through the Plugins screen.
3. Make sure WooCommerce is installed and active.

== Frequently Asked Questions ==

= Does this plugin require WooCommerce? =

Yes. WooCommerce must be installed and active.

= Will it work with caching? =

It should work with standard caching setups, but pricing/checkout behavior may require cache exclusions depending on your configuration.

= Where are the settings? =

After activation, the plugin adds its admin pages under the WordPress dashboard.

== Screenshots ==

1. Group Management - Organize campaigns with scheduling, status tracking, and bulk actions
2. Rule Editor - Build discount rules with product search, category selection, and customer targeting
3. Smart Notifications - Proactive alerts for expiring and starting campaigns with quick actions
4. Custom Messages - Configure promotional messages with icons, colors, and positioning options
5. Usage Limits - Set total and per-customer limits to control discount availability

== Changelog ==

= 1.0.0 =
- Initial release.

== Upgrade Notice ==

= 1.0.0 =
Initial release.
