=== DITS Cumulative Discount ===
Contributors: ditsagency
Donate link: https://dits.md
Tags: woocommerce, discounts, cumulative, loyalty, sales
Requires at least: 5.8
Tested up to: 6.9
Stable tag: 1.0.1
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html


Adds a cumulative discount based on a customer's historical spend, filterable by time period and product categories.

== Description ==

This plugin allows store owners to reward customers with cumulative discounts depending on the total amount they have spent.
Features include:
* Define discount rules (threshold amount → discount percentage).
* Filter eligible spending by time period (last month, last 6 months, last year, or all time).
* Restrict calculations to selected product categories.
* Discounts are automatically applied in the cart and checkout.

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/dits-cumulative-discount` directory, or install the plugin through the WordPress plugins screen directly.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Go to **WooCommerce → Cumulative Discounts** to configure discount rules, time periods, and categories.

== Frequently Asked Questions ==

= Does this plugin work with coupons? =
Yes, it works alongside WooCommerce coupons.

= Who sees the discounts? =
Only logged-in customers. The calculation is based on their past completed orders.

= Can I translate the plugin? =
Yes. A `.pot` file is included in the `/languages` folder.

== Screenshots ==
1. Admin settings page: configure discount rules, categories, and time period.  
2. Cart page: example of a cumulative discount applied.  

== Changelog ==

= 1.0.0 =
* Initial release.

= 1.0.1 =
* Fix: enqueue admin/front assets properly; move inline JS to separate files; localize data via wp_localize_script; i18n translators comments.

