Setting A Default Product Weight and Dimensions To Ship Your Products using WooCommerce Shipping Plugins
Most of the times WooCommerce store owners do not provide weight and dimensions to their products. Or in some cases, the products that they sell have lesser weight so the store owners choose not to provide product weight and dimensions. However, this creates problems when it comes to shipping these products. Since almost every shipping carrier requires weight to calculate shipping rates, it is very important to provide shipping rates to the products. This article will help you to set up default weight and dimension to your products so that the products can be shipped easily.
How To Set Default Product Weight & Dimensions
Consider the product shown in the image below. The product is not having any weight as well as dimensions set up on the product page.
Now, if this product is added to the cart, the following message is shown on the cart page.
To set up default product weight and dimensions, all you need to do is use the code in this link. Copy this code and paste it into the functions.php file. You can access this file by clicking,
Appearance > Editor > Functions.php
After doing so, provide your desired weight and dimensions for your products that you want to be applied by default. All you need to change the value in the following code to enter the length, width, height, and weight, respectively.
$default_length = 13;
$default_width = 13;
$default_height = 13;
$default_weight = 13;
After providing the default values, just save the changes and there you go. Now all your products will have the default weight and dimensions that you have provided using the code. As for our product, once adding the code we changed the default weight and dimensions to,
Weight – 1 lbs
Length – 2 in
Width – 3 in
Height – 2 in
And the result being shipping rates were displaying for the product. You can see the weight and dimensions of the products on the cart page by enabling the debug mode. The image below shows the shipping rates on the cart page for the product with no weight and dimensions.
Plugins Supporting This Functionality
- WooCommerce UPS Shipping plugin
- WooCommerce FedEx Shipping plugin
- WooCommerce Canada Post Shipping plugin
- WooCommerce Multi-Carrier Shipping plugin
- WooCommerce Table Rate Shipping Pro plugin
If you have any query regarding this article or have any difficulty in implementing the shipping scenario, please let us know in the comment section below. You can also contact us by following the link here. We will surely help you resolve your issues.