=== Bogofy – Buy One Get One for WooCommerce ===
Contributors: manzurahammed
Tags: woocommerce, bogo, buy one get one, free gift, discount
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 2.0.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Boost sales with automatic Buy One Get One (BOGO) offers for WooCommerce — free gifts or % discounts added to the cart. No coupons, no code.

== Description ==

**Bogofy is the easiest way to run Buy One Get One (BOGO) promotions in WooCommerce.** Create free-gift and percentage-discount offers that reward shoppers automatically at the cart — no coupon codes, no custom code, and no monthly fees.

Whether you want a classic "Buy 2, Get 1 Free", a "Buy this, Get that free" cross-sell, a category-wide giveaway, or a "Buy X, Get X at 50% off" deal, Bogofy applies the offer the moment a customer's cart qualifies. It works with modern WooCommerce (HPOS and the Cart/Checkout Blocks), ships with a clean React-based admin, and never tracks your store or your customers.

Bogofy is built to **increase average order value**, move slow-selling stock, and run seasonal sales — all from one simple screen.

= Flexible BOGO rule types =

Cover every popular promotion with four rule types:

* **Buy X, Get X Free** — buy N of a product and get M of the same product free (the cheapest qualifying items become free).
* **Buy X, Get Y Free** — buy a trigger product and get a *different* gift product at no cost.
* **Buy from Category, Get Free** — buy anything from a chosen category and receive a free gift product.
* **Buy X, Get X Discounted** — instead of fully free, discount the extra items by a percentage you choose.

= Target specific products, categories, or your whole store =

Decide exactly what triggers each deal:

* Apply to **specific products** you hand-pick.
* Apply to **specific categories** to run catalog-wide offers.
* Apply to **all products** for a store-wide promotion.

= Schedule promotions and control priority =

Run time-limited sales and keep overlapping offers under control:

* **Start and end dates** — schedule Black Friday, holiday, or flash sales in advance and let them expire automatically.
* **Rule priority** — when more than one rule matches a cart, the lower priority number wins, so you always know which deal applies.
* **Max free items per order** — cap how many free items a single order can receive to protect your margins.

= Automatic free gifts and storefront messaging =

Bogofy makes every offer obvious and effortless for shoppers:

* Free (or discounted) items are **added to the cart automatically** when it qualifies — no coupon codes required.
* Show **BOGO offer messages on product pages** so customers see the deal before they buy.
* Show **"BOGO Deal" badges** on shop and category pages to drive clicks.
* Customize the **free-item label** shown in the cart and the **cart notice** displayed when a deal is applied.
* Write your own **per-rule message** with placeholders like {buy_qty}, {free_qty}, {free_product}, and {discount}.

= Coupon stacking control =

Choose whether BOGO discounts can **stack with coupon codes** — enable it for generous promotions, or disable it to protect your margins.

= Works with modern WooCommerce =

* **HPOS ready** — fully compatible with High-Performance Order Storage.
* **Blocks ready** — works with the WooCommerce Cart and Checkout Blocks.
* Supports **simple and variable products** as both trigger and gift items.

= A modern, no-code admin panel =

Bogofy replaces clunky settings screens with a fast, guided experience:

* A step-by-step **rule creation wizard** with a live cart preview.
* A clean, React-based dashboard to create, edit, schedule, and toggle rules.
* Instant search and status filters to manage all your rules at a glance.

= Lightweight, private, and translation-ready =

* **No tracking** — Bogofy never collects or sends any data about your store or customers.
* **Clean, standards-compliant code** that follows the WordPress Coding Standards.
* **Translation-ready** and built for performance.

= Perfect for =

* Stores that want to **increase average order value** with irresistible free-gift offers.
* Shops running **seasonal, holiday, or flash sales**.
* Merchants who need to **clear slow-moving inventory** by bundling it as a free gift.
* Anyone who wants **BOGO deals without coupon codes** — or a developer.

= Why choose Bogofy? =

* **Free and full-featured** — every rule type and option is included, with no metered credits or upsell nags.
* **Set it and forget it** — schedule deals once and let them run and expire on their own.
* **Modern and reliable** — HPOS + Blocks compatible, privacy-friendly, and built on clean code.
* **Simple by design** — launch your first BOGO offer in minutes from a single screen.

Start rewarding your customers and growing your sales today with **Bogofy — Buy One Get One for WooCommerce**.

== Installation ==

1. Upload the `bogofy` folder to the `/wp-content/plugins/` directory, or install it from the Plugins screen in WordPress.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Make sure WooCommerce is installed and active.
4. Go to 'Buy One Get One' in the WordPress admin menu and create your first BOGO rule.

== Frequently Asked Questions ==

= Does this plugin require WooCommerce? =

Yes. WooCommerce must be installed and active for the plugin to work.

= Does this plugin work with variable products? =

Yes. Both simple and variable products are supported as trigger and gift products.

= Do customers need a coupon code? =

No. When the cart qualifies, the free item is added and priced at zero automatically.

= How do I turn everything off temporarily? =

Use the "Enable plugin" toggle on the Settings screen to switch all BOGO functionality off without deleting your rules.

== Screenshots ==

1. Dashboard overview showing active rules and stats.
2. Rules listing with status toggles.
3. Create rule wizard.
4. Preview Rules.
5. Settings screen for labels and display options.

== Changelog ==

= 2.0.0 =
* New rule type: **Buy from Category, Get Free** — trigger a gift from any product in a chosen category.
* New rule type: **Buy X, Get X Discounted** — give the extra items a percentage discount instead of fully free.
* New: **category targeting** — apply offers to specific product categories, not just individual products.
* New: **scheduling** — set optional start and end dates so promotions go live and expire automatically.
* New: **rule priority** — control which offer wins when more than one rule matches a cart.
* New: **max free items per order** to protect margins.
* New: **per-rule display messages** with placeholders ({buy_qty}, {free_qty}, {free_product}, {discount}).
* New: **coupon stacking control** — allow or prevent BOGO discounts from stacking with coupon codes.
* Improved: redesigned rule-creation wizard with an Options step and live cart preview.
* Improved: faster rules screen — searching and switching status tabs no longer reloads the whole page.
* Fixed: search icon alignment inside the rules search field.

= 1.0.0 =
* Initial release.
* Buy X Get X Free and Buy X Get Y Free rule types.
* Apply to specific products or all products.
* Automatic free items added to the cart.
* Product page messages, shop badges, and customizable cart labels.
* React-based admin panel.
* HPOS and Cart/Checkout Blocks compatibility.

== Upgrade Notice ==

= 2.0.0 =
Major update: category targeting, percentage-discount and cross-category rule types, scheduling, priority, coupon-stacking control, and a redesigned rule wizard.

= 1.0.0 =
Initial release of Buy One Get One.
