WooCommerce: Hide Weight & Dimensions From Additional Information Tab @ Single Product

If a WooCommerce product comes with weight and/or height / length / width values, these will be displayed by default in the Single Product page, under the “Additional Information” tab.

Should you need to hide them completely from the frontend while keeping the list of attributes below them, thankfully there’s a PHP one-liner you can use. Enjoy!

Continue reading WooCommerce: Hide Weight & Dimensions From Additional Information Tab @ Single Product

WooCommerce: Find Products With No Weight @ WP Admin

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

WooCommerce: Save & Display Order Total Weight

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

Enjoy ๐Ÿ™‚

Continue reading WooCommerce: Save & Display Order Total Weight

WooCommerce: Weight-Based Shipping Methods

With WooCommerce you get 3 default shipping methods: Flat Rate, Free Shipping, Local Pickup. For each one you can define a cost, however there is no way to set up some “weight” restrictions.

So, what if you want to display a rate for orders below 10 kg, and another shipping rate for orders above that weight?

Well, you can use simple PHP to accomplish lots of “advanced” shipping rules, such as shipping by weight.

As long as all your products have their weight information filled in, you can create some simple rules to conditionally hide/show certain shipping methods based on cart weight. Enjoy!

Continue reading WooCommerce: Weight-Based Shipping Methods