Package splitting
The plugin splits every order into one or more packages automatically. The logic is driven by three settings under WooCommerce → Settings → Shipping → Messenger:
| Setting | Meaning | Default |
|---|---|---|
| Ks do balíku | how many items fit into one package | 9999 |
| Obalový materiál | weight of the packaging material per package | 0.25 kg |
| Max. hmotnost | maximum weight of a single package | 30 kg |
The algorithm — items first, weight as a cap
Section titled “The algorithm — items first, weight as a cap”- The package count starts from the item count:
packages = ceil(items ÷ items per package). - Then a weight check: if an average package (order weight ÷ packages, plus packaging material) would exceed the maximum weight, the package count is increased so no package goes over the limit.
- Each package is reported to Messenger with the average weight (total weight incl. packaging ÷ package count), rounded up to whole kilograms — that’s what the Messenger API expects.
So the main lever is the item count; weight only kicks in as a safety cap for heavy orders.
Worked example: wine in six-packs
Section titled “Worked example: wine in six-packs”A winery ships bottles (1.5 kg each) in cartons of six, so Ks do balíku = 6 and packaging weight 0.25 kg:
| Order | Packages | Reported weight |
|---|---|---|
| 6 bottles (9 kg) | 1 | 10 kg (9 + 0.25, rounded up) |
| 7 bottles (10.5 kg) | 2 | 6 kg each (11 ÷ 2, rounded up) |
| 12 bottles (18 kg) | 2 | 10 kg each (18.5 ÷ 2, rounded up) |
Note the 7-bottle case: Messenger receives two packages with the same average weight, even though you’ll physically pack 6 + 1.
Things to know
Section titled “Things to know”- Every product must have a weight set in WooCommerce (Product data → Shipping), otherwise the weight cap can never do its job. See also Plugin settings.
- The plugin does not send Messenger’s size category (
velikost), nor package dimensions — Messenger determines the size category on their side. No plugin setting influences it. - Since version 2.7.0 the default packaging weight (0.25 kg) is applied consistently in the cart and on the order, and an explicitly set zero is respected.
Fine-tuning with filters
Section titled “Fine-tuning with filters”For per-order or per-cart logic you can override the three inputs with
filters — kbnt_messenger_pcs_per_package, kbnt_messenger_package_weight,
and kbnt_messenger_max_package_weight (plus their _cart variants used
during cart calculations). See
Developer filters and actions.
Was this page helpful?
Thanks for the feedback!
Sorry to hear that. Tell me what was missing and how I can help →