The Ultimate Guide to WooCommerce Flat rate Shipping

Flat rate shipping is the easiest shipping method to set up in WooCommerce. In this post, let’s find out how to set up flat rate shipping in WooCommerce and see how it fits to your business model.

What is flat rate shipping?

If you have sent a package via post office before, you should be familiar with flat rate shipping. As the name suggests, flat rate shipping impose an uniform shipping price on your package as long as it doesn’t exceed a certain weight or size.

For example, the shipping cost for packages less than 10 kg and 1 cubic meter is $10 per package.

The same idea applies to WooCommerce flat rate shipping.

How to add flat rate shipping in WooCommerce

By default, WooCommerce has three shipping methods

  • flat rate shipping
  • local pickup
  • free shipping

In order to use one of those method, you need to create a shipping zone first then in the zone, you can add one or more shipping methods, including flat rate.

how to add flat rate shipping to shipping zone in woocommerce

After creating the flat rate shipping method as in the above image, you can configure the rate, tax of that shipping method by clicking on the Edit link under “Flat rate”:

configure flat shipping rate and tax

As you can notice, there is a toggle button right below the Enabled title. You can enable or disable the shipping method by turn that button on or off.

Can I have multiple flat rate shipping setup?

There is no limit on number of shipping method per zone so you definitely can have multiple flat rate shipping setup, in one zone. You may wonder, why do I need multiple flat rate shipping for one zone?

One good example is you provide standard shipping at a lower rate and priority shipping at higher rate. At the cart page, customers can choose which shipping method they want to use. If they need the products to be delivered fast, they will choose the priority shipping method. Otherwise, they can choose the standard shipping method to save money on shipping.

Let’s set that up:

adding multiple flat rate shipping for one zone

Now, on the cart page, the customers will see all the shipping options available:

flat rate shipping options on cart page

 

How to add flat rate shipping per item using shipping classes

At this point, you should be comfortable with adding flat rate that applies to all items. What if you want to set a different shipping rate for some particular items? For example, I have a store selling computer hardware. While keyboards, mice can be shipped without much care, monitor requires special packaging and handling. I would like to charge $50 more for monitors. How can I set that up?

First we need to add a shipping class. Adding shipping class in WooCommerce is simple. Let’s go to WooCommerce->Settings->Shipping->Shipping classes and add one:

add a shipping class in woocommerce

Now, the next step would be to go the monitor and assign it the “monitor” shipping class:

assign shipping class to product

Finally, let’s configure the shipping rate for “monitor” shipping class in our shipping methods.

Let’s go to WooCommerce->Settings->Shipping->Shipping zones and edit our zones. Let edit all the enabled flat rate shipping method in that zone and add the additional fee accordingly:

add shipping cost to shipping class

Now if I go to the cart, I can see that the shipping cost is higher:

shipping cost updated after using shipping classes

If you remember, the standard shipping was $10 and the priority shipping was $30. Since we added $30 for the “monitor” shipping class, the shipping cost updated accordingly.

WooCommerce flat rate shipping by quantity

If you notice that we have 2 items in cart here. The shipping cost for the “monitor” only calculated once. What if you want to charge the additional shipping cost PER ITEM?

That’s easy, let’s go back to our shipping methods and edit each of them then enter this:

using formula to calculate flat rate shipping cost

Now, if I go to the cart page, surely I’ll see the shipping cost is calculated for all items in cart:

cart udpated after using formula

Hide flat rate shipping if free shipping is enabled

You may want to reward the customers by offering free shipping to all order exceeds $300. In this case, you also want to hide other flat rate shipping methods. What can you do to achieve this?

You’ll need to enter some code. Don’t worry, it won’t be hard.

First thing first, you need to create a child theme if you haven’t got one. Why do you need a child theme? How to create one? Find all the answers here

Now you have your child theme ready. Let’s go to its functions.php file and paste the following code:

 

function bc_hide_shipping_when_free_is_available( $rates ) {
  $free = array();
  foreach ( $rates as $rate_id => $rate ) {
    if ( 'free_shipping' === $rate->method_id ) {
      $free[ $rate_id ] = $rate;
      break;
    }
  }
  return ! empty( $free ) ? $free : $rates;
}
add_filter( 'woocommerce_package_rates', 'bc_hide_shipping_when_free_is_available', 100 );

add code to functions.php to hide other shipping methods when free shipping available

Click on update file and let’s go to the cart page, you’ll see that if free shipping is available, all other methods are hidden:

other shipping methods hidden when free shipping available

Conclusion

As you can see, flat rate shipping at first seems to be rigid and hard to customize. However, when combine with shipping classes and free shipping method, you can offer very flexible shipping options for your customers. Using shipping classes enables you to set the max shipping fee for an order, set the shipping fee based on the quantity and the total of the cart.

 

 

How To Set Up Free Shipping Coupon In WooCommerce

Coupon is a great way to reward your customers. In WooCommerce, you can create coupons for almost anything. You can create a coupon that offers a 10% discount or a fix amount discount. However, little people know that you can create a free shipping discount. You can even set a minimum order for that coupon to be effective. Sounds good? Let’s find out how to set up free shipping coupon in WooCommerce.

Here are what we are going to do to setup free shipping coupon:

  1. Make sure your store has coupon enabled
  2. Create the coupon that enables free shipping
  3. Add free shipping to your shipping zone
  4. Apply the coupon on a test order

Make sure your store has coupon enabled

The very first step is to make sure you have the use coupon option checked. Let’s go to WooCommerce->Settings->General and scroll down to the Enable coupons section:

enable the coupon codes usages in WooCommerce

Make sure you have the checkbox “Enable the use of coupon codes” checked. We are ready for the next step.

Create the coupon that enables free shipping

Let’s go to WooCommerce->Coupons and click on Add coupon:

go to woocommerce coupon

Now, enter the details for your coupon:

create the coupon that enables free shipping

There are three fields you need to pay attention to, other fields are not important in enabling free shipping for the coupon.

  1. You need to give the coupon a name. In the example above, my coupon’s name is SHIPZERO
  2. You may or may not give the coupon a description. However, it’s extremely helpful when you come back and visit your coupons later, you will know exactly what they do.
  3. There is a small check box says “Allow free shipping” and you need to check it.

That’s all we need to do with the coupon. Now, click on submit and move on to the next step.

Create free shipping method for your shipping zone

Our next step is to create a free shipping method in your shipping zones. If you have multiple shipping zones, you may need to create one free shipping method for each zone.

Let’s head to WooCommerce->Settings->Shipping->Shipping zone:

all shipping zones in woocommerce

As you can see, I have four zones here. I’m going to enable free shipping for Australia. As mentioned before, if you need to enable the use of the free shipping coupon we have just created, you may need to repeat the following steps for all zones.

Let’s click on the Edit link under Australia:

all shipping methods in Australia

Let’s click on Add shipping method:

add free shipping method for zone

Select free shipping in the drop down box and click on Add shipping method.

Then, you will see a new shipping method added in our list:

free shipping method is now under Australia

Let’s click on the Edit link under free shipping. We are going to configure the condition for the free shipping option to be effective.

configure free shipping option

Here, you can edit the title. I’ll leave the default title as Free shipping. The most important field is the select box: Free shipping requires…

There are a few options you can select from. You can require that the order must have a minimum amount so the coupon can be active. However, I’m going with the first option here, which requires only a valid shipping coupon.

After that, click on Save changes and we are done.

Apply the coupon on a test order

We are going to make a test order on my store. Let’s add some items and go to cart and click on Proceed to check out.

change country

The total before coupon is applied:

total before coupon applied

 

You can see the notice says: “have a coupon?…” If you are going to apply the coupon now, the coupon will not have any effect. Why? As you may remember, we only enabled free shipping for Australia. However, the country in the Country field is Vietnam. Let’s add our address to Australia and try to apply the coupon:

apply the coupon code

code apply successfully

Now, if we check the cart total, the free shipping fee is $0:

free shipping applied

Conclusion

As you can see, setting up free shipping coupon in WooCommerce is quite easy. However, if you have multiple zones, you may need to do some repetitive work. There is a workaround though. That is to create a shipping zone that cover all shipping zones then create a free shipping method for that zone.