=== Box Rate Shipping for WooCommerce ===
Contributors: catcodestudio
Tags: woocommerce, shipping, box, packaging, dimensions
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Charge for the box the order actually fits into, instead of guessing from weight and shipping class.

== Description ==

WooCommerce quotes shipping by weight and shipping class. The courier charges for the box the parcel actually went into. For anything bulky those two numbers are not close, and the difference comes out of your margin on every order.

This plugin closes that gap. You describe the boxes you really ship in — length, width, height, maximum weight, what each one costs — and the checkout quotes the cost of the boxes the order fits into. If it does not fit in one, it is split across several.

* First-fit-decreasing packing: largest items first, smallest box that will take them.
* Items are checked against all three sides of a box, not just its volume — a 90 cm item does not go into a 40 cm box however much spare volume it has.
* Rotation is optional, for products that must travel one way up.
* Cost per box, plus an optional per-kilo surcharge, plus a handling fee applied once per shipment.

= Empty dimensions after an import =

The most common reason a box-based rate goes wrong has nothing to do with the maths: the shop imported a feed that left the size fields empty, so half the catalogue is officially zero-sized. Most plugins happily quote those as flat and the merchant finds out from the courier invoice.

This one does not. By default it refuses to quote for a cart containing a product with no size, writes the product names to **WooCommerce → Status → Logs**, and lists them on its own settings screen so you can fix the import. If you would rather it guessed, two other policies are available — but it is a decision you make, not a default you never saw.

= Free and Pro =

The free version uses your three smallest box formats, which fully covers a shop that ships in a couple of sizes. Pro removes the limit.

== Installation ==

1. Install and activate. WooCommerce must be active.
2. Go to **Box rate** in the admin menu and describe your boxes.
3. Add the "Box rate" method to a shipping zone under WooCommerce → Shipping.

== Frequently Asked Questions ==

= Is this a real 3D bin packer? =

No, and it does not pretend to be — optimal 3D packing is NP-hard and no checkout should be solving it. It is first-fit-decreasing with a real per-side fit test, which never claims a fit that is physically impossible. That is the property that keeps the quote honest.

= What units does it use? =

Your shop's own, from WooCommerce → Products → Measurements. Nothing is converted behind your back.

= Does it work with HPOS? =

Yes, and with the cart/checkout blocks.

== Changelog ==

= 1.0.0 =
* First release.
