Let’s say you are selling a Hoodie which comes in 3 variations:

  • Short Sleeve
  • Three Quarter Sleeve
  • Long Sleeve


You want to offer Flat Rate shipping as follows:

  • Short Sleeve – $15.00
  • Three Qurter Sleeve – $7.00
  • Long Sleeve – $0.00 (Free)

You can setup Flat Rate method as shown below:

As a result, when the user selects Short Sleeve Hoodie and adds it to a cart, they are presented with the following shipping option:

So far so good!

When the user selects Three Quarter Sleeve Hoodie and adds it to a cart, they are presented with the following shipping option:

Awesome!

Finally, when the user selects Long Sleeve Hoodie and adds it to a cart, they are presented with the following shipping option:

Notice there is no $0.00 next to “Flat Rate”? Turns out, this behavior is expected and default in WooCommerce.

Good news – there is a fix!

Remember that in order to preserve this code and have it in place after WooCommerce update, you would ideally need to create a child theme of your theme and place the entire function into this child theme’s functions.php file.

We’ll get the following result after using the code snippet above:

Feel free to ask follow-up questions in comments.

Happy Shipping! 🙂

Posted by Julia Amosova

I love traveling, New York City, coffee, my husband, late mornings, taking pictures, new cool technologies and good books.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s