=== SPP BOGO for WooCommerce ===
Contributors: simpliplugin
Tags: woocommerce, bogo, buy one get one, coupon, discount
Requires at least: 5.8
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Automates BOGO discount setups inside the native WooCommerce coupon interface.

== Description ==

**SPP BOGO for WooCommerce** adds a dedicated **BOGO** tab to every WooCommerce coupon so you can configure Buy X Get Y offers without leaving the coupon editor. It also supports automatic item-based BOGO rules (no coupon required).

= Key features =

* **Item BOGO** — automatic Buy X Get Y on cart/order line items under WooCommerce → Item BOGO.
* **Native coupon UI** — optional BOGO settings on Marketing → Coupons → edit coupon → BOGO tab.
* **Buy X Get Y** — set buy quantity and get quantity.
* **Free or percent off** — get items free, or apply a percentage discount.
* **Same or specific get products** — discount the same qualifying products, or choose separate get products.
* **Repeat once or unlimited** — one set per cart, or every completed set.
* **Cheapest / most expensive first** — control which get units are discounted.
* **Respects coupon restrictions** — product and category rules on the Usage restriction tab still apply.
* **Dual market ready** — builds for SimpliPlugin and WordPress.org via `SPP_BOGO_MARKET`.
* **HPOS compatible** and translation-ready.

= Example =

Create a coupon, open the **BOGO** tab, enable BOGO, set Customer buys `1` and Customer gets `1`, leave Get discount as Free. Set Discount type to Percentage discount and Amount to `0`. Apply product restrictions if needed. Customers with 2 qualifying items get the cheaper one free.

== Installation ==

1. Upload the `spp-bogo-for-woocommerce` folder to `/wp-content/plugins/`, or install through the Plugins screen.
2. Activate **SPP BOGO for WooCommerce**.
3. Make sure WooCommerce is active.
4. Go to **WooCommerce → Item BOGO**, or edit any coupon and open the **BOGO** tab.

== Frequently Asked Questions ==

= Does this require WooCommerce? =

Yes.

= Which discount type should I use on the General tab? =

When coupon BOGO is enabled, use **Percentage discount** with **Amount 0**. The BOGO engine calculates the offer.

= Can I target specific products? =

Yes. Use Item BOGO product/category fields, or the coupon Usage restriction tab for coupon BOGO.

= How do I switch markets (SimpliPlugin vs WordPress.org)? =

Define `SPP_BOGO_MARKET` as `simpliplugin` or `wordpress.org` in `wp-config.php`, or change the default in the main plugin file before packaging.

== Changelog ==

= 1.0.0 =
* Initial release — item BOGO, coupon BOGO tab, cart engine, dual-market helper.

== Upgrade Notice ==

= 1.0.0 =
Initial release.
