Let’s imagine you are selling cosmetic products on your site. You set up a Shampoo + Conditioner Duo product which has 2 variations:

  • Full Size
  • Samples

Let’s assume you primerely use WooCommerce USPS Shipping Method extension to offer live USPS shipping rates to your customers at checkout. It is working great for you for most of the products. However, you want to offer small Flat Rate fee when you customers select Sample products.

You are looking to set up the following shipping rules:

  • If a US customer adds Sample product to the cart – Flat Rate of $3.50
  • If a US customer adds Full-Size product to the cart – USPS Rate
  • If a US customer adds both Sample and Ful-Size products to the cart – USPS Rate

It is not possible to set these rules up using standard WooCommerce Core functionality. The good news is that there is an extension called Conditional Shipping & Payments that can help in this case.

Let’s look at the exact setup.

First, you’d need to set up United States Shipping zone and add Flat Rate and USPS shipping methods to it:

Then, create two shipping classes and call them, for example, Full Product Size and Sample Size:

Next, configure Flat Rate and set it to $3.50 for the Samples Shipping Class as follows:

Configure USPS settings next. Mine look like on the screenshot below but you can set it the way need:

Let’s assume that you already created a variable product but now need to assign Sample Size shipping class to Sample variation and Full Product Size shipping class to Full-Size variation. My final product variation settings look as follows:

Now we are ready to set our conditional shipping rules. Navigate to WooCommerce > Settings > Restrictions > Shipping Methods and set the rules as shown in the screenshots below:

And you are all set!

Let’s see how it looks at the front-end of our site and check if the requirements we were looking for have been met:

  • If a US customer adds Sample product to the cart – Flat Rate of $3.50

Check!

  • If a US customer adds Full-Size product to the cart – USPS Rate

Check!

  • If a US customer adds both Sample and Ful-Size products to the cart – USPS Rate

Check!

All of our initial conditions have been met and our mission is accomplished.

There are many other ways of how you can use Conditional Shipping and Payments extension and I am planning on adding few more use cases in the future.

Feel free to ask questions in comments.

Happy Conditional 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