I'm trying to set shipping rule in woocommerce. My conditions are as follows.

  1. $25 for selected postal codes; if total cart value is < $250
  2. $0 / Free for same selected postal codes; if total cart value is >= $250
  3. Flat $25 for another set of postal codes (let's say Zone B)
  4. Generic message to call; if shipping/billing address is international.

I tried using the Shipping Zone, I created zones and when I apply "Flat Rate", I'm not sure how should I put the condition into it. there is no guideline from woocommerce which explains in details of using [qty] [cost] [fee]

I did this: ([cost]<250)+25 (obviously, it's not working.) again, I did add second rule: ([cost]>=250)+0 (again this is same)

both are showing up if the postal code matches in shipping/billing address, but not is satisfying the condition.

my question is that is there a way to make this conditional based shipping rule work? either by coding or by manipulating it from the backend?

Or do I need to purchase the premium plugin for it?

2 Answers 2


Possible through backend, but you'll have to use 2 shipping methods.

Flat rate with your shipping cost and free shipping with minimum order amount.

Adjust according to your zones.

Zone A:



And zone B will be just flat rate


To hide other shipping methods when free shipping is available:

You'll need to hook into woocommerce_package_rates.

Use one of the snippets in WooComm docs based on your version.


  • I'm already using 2 shipping method from backend, the problem I'm getting is into conditions. If you are sure that it can be achieved from backend, then can you please provide example or steps how it should be done? Feb 1, 2017 at 13:43
  • See the edit, I've included screenshots. Feb 1, 2017 at 13:50
  • Hi @Aniruddha, I'm sorry It's been a while on this thread. I did created the shipping method as you suggested, but still it's not satisfying the conditional logic. On the frontend, it's showing both Free shipping method and cost for specific zone. Jun 8, 2017 at 9:42
  • Not sure I understand. Is free shipping showing up even if min cost is not satisfied? Jun 8, 2017 at 14:06
  • let's say, I created a zone A, which have 2 following shipping rule 1. 25 If the cart value is less than 250 2. Free if the cart value is greater than 250. I created both flat rate and free shipping rule for the same Zone A, now If 1. cart value is less than 250, it's showing 25 as shipping cost 2. cart value is greater than 250, it's showing both option a. 25 and b. free shipping. whereas it should only show, free shipping. I hope I mentioned it correctly, If you still confusion then let me know. Jun 8, 2017 at 14:13

This functionality is not available in default woocommerce. So You Can Use this Plugin for set shipping rule in woocommerce.

first review this plugin Table Rate Shipping : https://woocommerce.com/products/table-rate-shipping/ And then buy it.

I hope it useful it.

  • Hi @jignesh, just for a small logic, is it really worth of buying this $99 plugin, all other requirement is been done, it's just that conditional logic needs to be satisfied. Jun 8, 2017 at 9:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.