=== CB Quantity Breaks for WooCommerce ===
Contributors: chrismaryey02
Tags: woocommerce, quantity discount, quantity breaks, bulk pricing, wholesale
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.4.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Display a quantity discount table on WooCommerce product pages and automatically apply tiered pricing in the cart.

== Description ==

CB Quantity Breaks for WooCommerce lets you offer quantity-based ("buy more, save more") discounts on any WooCommerce product, without coupons or third-party checkout add-ons.

For each product you can define multiple quantity tiers, each with its own price per unit. On the product page, customers see a clear discount table showing every tier and how much they save. As they change the quantity, the table highlights the tier that applies to them and the displayed price updates live. When the product is added to the cart, the correct tiered price is applied automatically at checkout.

**Features**

* Add unlimited quantity/price tiers per product, from the standard WooCommerce product edit screen.
* Automatic discount-table display on the single product page.
* Live price and quantity-table updates as the customer changes the quantity or a variation.
* Automatic tiered pricing applied to the cart total — no coupon codes required.
* Works with simple and variable WooCommerce products.
* Lightweight: no external services, tracking, or dependencies beyond WooCommerce.
* Settings screen (under Products → Quantity Breaks) to control how and where the table is displayed, customize the unit label (e.g. "roll" / "rolls", "box" / "boxes"), and toggle the savings nudge message.
* `[cbqb_tier_table]` shortcode to place the discount table anywhere — a custom theme template, a page, or a widget — independent of the automatic display setting.

This plugin does not limit, gate, or paywall any of its functionality. Everything described above is included, in full, for free.

= Requirements =

* WooCommerce must be installed and active.

== Installation ==

1. Upload the `cb-quantity-breaks-for-woocommerce` folder to the `/wp-content/plugins/` directory, or install the plugin directly through the WordPress plugin screen.
2. Activate the plugin through the "Plugins" screen in WordPress.
3. Make sure WooCommerce is installed and active.
4. Edit any WooCommerce product, open the Product Data panel's "Quantity Discount" tab, and add your quantity/price tiers.
5. Save/update the product. The discount table will appear automatically on the product page.

== Frequently Asked Questions ==

= Does this work with variable products? =

Yes. Tiers are saved against the parent product and apply across its variations.

= Do I need to create coupon codes? =

No. Tiered pricing is applied automatically based on the quantity in the cart.

= My theme doesn't show the table automatically. What do I do? =

Go to Products → Quantity Breaks in wp-admin. Either pick a different automatic hook under "Custom hook", or switch to "Shortcode only" and place `[cbqb_tier_table]` in your theme template with `do_shortcode()`.

= Can I change the wording "unit(s)" to something else, like "roll" or "box"? =

Yes, under Products → Quantity Breaks → Unit label, set your own singular/plural labels.

= Does this plugin phone home or track users? =

No. The plugin does not collect analytics, connect to external services, or add any external links to your site.

== Screenshots ==

1. Quantity discount table displayed on a WooCommerce product page.
2. Tier pricing editor on the product edit screen.

== Changelog ==

= 1.4.0 =
* Renamed the plugin from "CB Tier Pricing for WooCommerce" to "CB Quantity Breaks for WooCommerce" (slug: cb-quantity-breaks-for-woocommerce) to avoid confusion with other tier-pricing plugins, per WordPress.org Plugin Review feedback.
* Moved all inline `<style>` and `<script>` blocks to properly enqueued CSS/JS files (`wp_enqueue_style()` / `wp_enqueue_script()`), instead of printing them directly in HTML.
* Corrected the readme Contributors list.

= 1.3.1 =
* Fixed the Text Domain header to match the plugin slug (cb-tier-pricing-for-woocommerce), required for WordPress.org submission.
* Updated "Tested up to" to the current WordPress version.

= 1.3.0 =
* Quantity discount fields now live in their own "Quantity Discount" tab in the Product Data panel, instead of being appended to the Inventory tab.

= 1.2.0 =
* Moved the quantity/price tier fields from a separate meta box into the Product Data panel, under the Inventory tab.

= 1.1.0 =
* Added a Settings screen under Products → Tier Pricing.
* Added a `[cbtp_tier_table]` shortcode for manual placement in custom themes.
* Added configurable display mode (automatic / custom hook / shortcode only) to support themes that don't fire the standard WooCommerce summary hook.
* Added configurable unit label (singular/plural) and a toggle for the savings nudge message.

= 1.0.0 =
* Initial public release.

== Upgrade Notice ==

= 1.4.0 =
Plugin renamed to "CB Quantity Breaks for WooCommerce". If you used the `[cbtp_tier_table]` shortcode, update it to `[cbqb_tier_table]`. Settings have moved to Products → Quantity Breaks. Your saved tiers are not affected.

= 1.1.0 =
Adds a settings screen, shortcode, and configurable display options. No action required to upgrade.

= 1.0.0 =
Initial public release.
