=== DiscountWizard for WooCommerce ===
Contributors: highwebservices
Donate link: https://highwebservices.ro/
Tags: woocommerce, discounts, sales, bulk pricing, campaigns
Requires at least: 5.8
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 3.5.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Bulk discount campaigns for WooCommerce: apply percentage discounts by product categories (with optional subcategories) and schedule start/stop.

== Description ==

DiscountWizard allows store managers to:

* Create campaigns that apply percentage discounts across one or more product categories.
* Optionally include subcategories automatically.
* Target individual products by pasting product links (can be mixed with category links).
* Target simple products and/or variable product variations.
* Toggle campaigns ON/OFF with a single click.
* Schedule campaigns to start and stop at specific times (using WP‑Cron).
* View campaign history logs for transparency.
* Create gift bundles: "buy these products, get a gift" with a step-by-step configurator on product pages, variation selection, optional free shipping and scheduling.

**Example use cases:**
* Seasonal sales (e.g. Back to School, Black Friday).
* Category‑wide promotions.
* Time‑limited discounts.

**Features:**
* Bulk pricing adjustments by category.
* Automatic recalculation of variable product parent prices.
* Campaign scheduling with automatic ON/OFF.
* Campaign logs with the last 500 entries.
* Admin UI integrated under the WooCommerce menu.

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/discountwizard` directory, or install directly from the WordPress.org plugins screen.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Find the "DiscountWizard" submenu under **WooCommerce**.
4. Create your first campaign by pasting category links, setting a discount percentage, and choosing product types.

== Frequently Asked Questions ==

= Do I need to edit each product manually? =
No. Campaigns apply discounts in bulk across selected categories.

= Can I schedule campaigns to run automatically? =
Yes. You can set a "From" and "To" date/time. The plugin will automatically turn the campaign ON and OFF using WP‑Cron.

= Does it work with variable products? =
Yes. You can apply discounts to variations. Parent prices are automatically synchronized.

= What happens when I turn a campaign OFF? =
The sale prices created by that campaign are cleared, returning products to their regular prices.

== Screenshots ==

1. Admin campaign list with status badges and actions.
2. Campaign creation form with category URLs and scheduling options.
3. Campaign logs accordion with history entries.

== Changelog ==

= 3.5.0 =
* New: "Campanie Transport Gratuit" tab – turn free shipping ON/OFF instantly, or schedule From / To (starts and stops by itself).
* Optional minimum cart value ("Mai adaugă X lei pentru transport GRATUIT" in cart).
* Customer message with {min} / {until} placeholders, shown as a top bar, on product pages and in cart/checkout (classic and blocks); configurable shipping label and bar colors.
* Admin countdown shows days for long intervals.

= 3.4.0 =
* Fix: wizard / banner buttons no longer turn white-on-white when the theme or page builder restyles buttons on hover/focus.
* New: "Nu vreau pachet" button in the wizard adds only that product to the cart (respects the WooCommerce "redirect to cart after add" setting). The wizard starts with the product of the current page.
* Skipping a single product is still possible via a discreet "Sari peste acest produs" link.
* New: "Bundle appearance" tab – colors for buttons, titles, text, backgrounds, gift/success accents, corner radius and button texts, with live preview.

= 3.3.0 =
* New: Gift bundles tab. Define products to buy (links), how many are required, gift products and how many gifts can be chosen.
* New: Product page banner + wizard (variation selection, skip products, choose gift), shop badges, cart/checkout/mini-cart notices (classic and block cart/checkout).
* New: Gifts are added at price 0, quantity locked, removed automatically when the bundle no longer qualifies; order line meta "Cadou".
* New: Optional free shipping when the bundle qualifies, shown in banner, cart, checkout and thank-you page.
* New: Bundle scheduling (From / To), checked live.
* New: Shortcode [dwz_bundle] / [dwz_bundle id="..."].
* Default "Pachet Stokke Nomi" bundle is created (OFF) on first load.
* Admin: notices from other plugins are no longer shown on the DiscountWizard screen.
* Admin: fixed nested forms on the campaigns screen.

= 3.2.0 =
* The links field now accepts product links as well as category links (mixed, one per line).
* Product links are always discounted (simple and variable); the product type option applies to category links.
* Unrecognized links are reported in a warning after saving.
* Variable parent products are synced once per campaign run.

= 3.1.0 =
* Initial public release on WordPress.org.
* Admin UI rebuilt with accessibility and i18n support.
* Campaign scheduling added.
* Cron cleanup and uninstall routine implemented.

== Upgrade Notice ==

= 3.1.0 =
First stable release of DiscountWizard — includes campaign scheduling, improved admin UI, and uninstall cleanup.

== License ==

This plugin is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This plugin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this plugin. If not, see <https://www.gnu.org/licenses/>.