Skip to content
Čeština

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:

SettingMeaningDefault
Ks do balíkuhow many items fit into one package9999
Obalový materiálweight of the packaging material per package0.25 kg
Max. hmotnostmaximum weight of a single package30 kg

The algorithm — items first, weight as a cap

Section titled “The algorithm — items first, weight as a cap”
  1. The package count starts from the item count: packages = ceil(items ÷ items per package).
  2. 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.
  3. 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.

A winery ships bottles (1.5 kg each) in cartons of six, so Ks do balíku = 6 and packaging weight 0.25 kg:

OrderPackagesReported weight
6 bottles (9 kg)110 kg (9 + 0.25, rounded up)
7 bottles (10.5 kg)26 kg each (11 ÷ 2, rounded up)
12 bottles (18 kg)210 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.

  • 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.

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?