=== Navoto BOGO ===
Contributors: Navoto
Tags: woocommerce, bogo, discount, offers, free gift
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Buy One Get One and percentage discount rules for WooCommerce, including an optional free-gift popup.

== Description ==

Navoto BOGO adds configurable sales rules for your WooCommerce store. Assign products globally or per product, then let the cart apply BOGO-style pricing, percentage discounts, or free-gift popups according to each rule.

= Key features =

* **Rule 1 — Buy 1 Get 1 (free)** — Cart line quantity becomes two; the customer pays for one unit.
* **Rule 2 — Second item at X% off** — Percentage is set under WooCommerce → BOGO & Offers.
* **Rule 3 — Buy two, X% off both** — For qualifying products in the cart.
* **Rule 4 — Free gift popup** — Qualifying purchases unlock a popup to choose one free gift from products you define.
* **Rule 5 — Buy X get Y free (same product)** — Configure X and Y in settings.
* **Badges** — Optional labels on shop and single product pages when a product is tied to a rule.
* **Sanitized settings** — Product lists and numeric options are validated on save.
* **Secure saves** — Product meta uses WooCommerce nonces and capability checks; popup AJAX uses nonces.

= Requirements =

* WordPress 6.0 or higher
* PHP 7.4 or higher
* WooCommerce installed and active

= Configuration =

* **Global:** WooCommerce → BOGO & Offers — pick products and numbers for each rule.
* **Per product:** Product edit screen — enable the rule that applies to that product where offered.

For developer-oriented install notes, testing ideas, and troubleshooting, see **README.md** in the plugin package (GitHub or local copy). The WordPress.org plugin page is generated from this **readme.txt** file only.

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/navoto-bogo` directory, or install the plugin through the WordPress plugins screen directly.
2. Activate the plugin through the Plugins screen in WordPress.
3. Ensure WooCommerce is installed and active.
4. Go to WooCommerce → BOGO & Offers and configure your rules.
5. Optionally edit individual products to tie them to specific rules.

== Frequently Asked Questions ==

= Does this work without WooCommerce? =

No. WooCommerce is required. The plugin does not load its storefront logic until WooCommerce is active.

= Where are settings stored? =

Options are stored in the WordPress options table under keys prefixed with `navoto_bogo_`. Per-product choices use post meta keys prefixed with `_navoto_bogo_rule_`.

= Does the plugin send data to external services? =

No. Navoto BOGO does not connect to third-party APIs. All rules and cart logic run on your server with WooCommerce.

= I used an older “bogo-offers” build — will my settings migrate? =

On activation, legacy `bogo_*` options are copied to `navoto_bogo_*` when the new key is empty. Product meta saved under old keys is still read where supported. Open a new cart session after switching plugins if totals look wrong.

== Screenshots ==

1. WooCommerce → BOGO & Offers — global product lists and rule settings
2. Product data — per-product rule checkboxes
3. Shop or product page — offer badges (when applicable)
4. Cart — discounted lines and BOGO quantities
5. Free gift popup — gift selection after qualifying (Rule 4)

== Changelog ==

= 1.0.2 =
* Remove WordPress.org directory assets from the plugin package (upload via SVN after approval).
* Enqueue all CSS and JavaScript via wp_enqueue_style() and wp_enqueue_script().
* Remove custom wc_enhanced_select_params localization; rely on WooCommerce core scripts.

= 1.0.1 =
* WordPress.org Plugin Check compliance (i18n, escaping, packaging).
* Tested up to WordPress 7.0.

= 1.0.0 =
* Initial release on WordPress.org.

== Upgrade Notice ==

= 1.0.2 =
Packaging and enqueue compliance update. No settings changes required.

= 1.0.1 =
Maintenance release for WordPress.org guidelines. No settings changes required.

= 1.0.0 =
First public release. Requires WooCommerce. Configure rules under WooCommerce → BOGO & Offers.

== Support ==

For support, please use the [WordPress.org support forums](https://wordpress.org/support/plugin/navoto-bogo/) for this plugin once it is live.

== External Services ==

This plugin does not load third-party SDKs, embed remote tracking, or send your store data to external servers by design. Offer logic runs entirely in WordPress and WooCommerce on your hosting.

== Privacy Policy ==

Navoto BOGO does not collect personal data for its own purposes. Settings are stored in your WordPress database. Cart and checkout behavior follow WooCommerce and your theme. Popup and AJAX actions use WordPress nonces and standard WooCommerce cart handling.

== Credits ==

* Built for WooCommerce cart and product APIs
* Thanks to the WordPress and WooCommerce communities
