If your shipping rates depend on product weight, it is very likely you’ve forgotten to add weight to ALL your products. In this way, some shipping rates may be underestimated on the WooCommerce Checkout page.
So, here’s how to print a notice on the WordPress Dashboard > Products screen with a list of products that have no weight, together with the links to edit them quickly.
This is a handy snippet you can reuse for other case scenarios such as easily finding products with no dimensions, no prices, no images, no custom field value, or even a specific weight or given price. Enjoy!
Continue reading WooCommerce: Find Products With No Weight @ WP Admin
For tracking purposes, or maybe because your shop manager needs to be aware of this, saving the total weight of each order and displaying it on the single order admin page is quite simple.
That’s right – WooCommerce does not save this value by default. You either need to save it yourself into the “order meta” or recalculate the weight based on the order items and their quantities. Here, we’ll cover option one (saving is better than calculating in regard to performance).
Continue reading WooCommerce: Save & Display Order Total Weight
Following up from the other day’s snippet (deny checkout based on cart weight), you might want to show what is the current Total Weight on the cart and checkout page in case this is useful to your customers.
Of course, in order for this snippet to work, all your products must have a weight, otherwise the total will always be equal to 0. So here you go – enjoy!
Continue reading WooCommerce: Display Total Weight @ Cart & Checkout
A WooCommerce fan asked me: “How do you deny checkout if the cart weight is above a certain threshold?“.
Well, this is straight forward thanks to a WooCommerce core function called “cart_contents_weight” which allows you to get the total weight of your cart, and then the “wc_add_notice” function which shows a notification error.
Continue reading WooCommerce: Deny Checkout Based on Cart Weight
With WooCommerce Shipping Zones you can use simple PHP to accomplish lots of “advanced” shipping rules, such as shipping by weight.
With many of Business Bloomer fans always asking for this sort of customization, today we’ll see how to do just that. Without the need of just another plugin 🙂
Continue reading WooCommerce: Shipping by Weight (Without a Plugin!)