Skip to content

Woocommerce cart volume

  • by

Should be easy, right? I mean, when you create a product you are offered built in fields to fill out for weight, width, length and height.

However I’ve been finding it anything but easy. After scouring the woocommerce support forums without luck, I ended visiting #wordpress on freenode for help.

While No-one there specifically knew of the lack, I gathered enough tips to whip up a proof of concept of calculating the volumetric (greatest of total weight and total volume) of the cart . It’s a bit shocking to need to resort to this for a need that any shop that sells physical products they freight to customers, must face – most freight companies will bill you the greater of the volumetric or weight of an order.