Flexible Shipping PRO – Disable or hide the shipping method

Case study

Let’s assume you run a shop and use the shipping cost calculation rules based on weight. Some of the products you are selling with the Non-shippable shipping class assigned cannot be shipped and require to be picked directly from your warehouse. What’s more the shipping company you’ve signed a contract with does not allow the package to exceed 70 kg. That’s why you’ve also decided not to ship your products if the number of items in the cart is equal or over 15.

How to configure such a scenario where the shipping cost is calculated based on weight and hide the shipping method if the cart contains a product with Non-shippable shipping class, the products’ total weight is higher than 70 kg or the item quantity equals or exceeds 15?

Plugin configuration

  1. Add the shipping cost calculation rules based on Weight and define their ranges and pricing. For the purposes of these guide we will create 3 new weight-based rules. Set them the way described below:

If you already have your own rules configured, please proceed straight to the step #2.

  • 1st rule:
    • When: Weight
    • to: 5
    • rule cost is: 7
  • 2nd rule:
    • When: Weight
    • is from: 5.001
    • to: 10
    • rule cost is: 15
  • 3rd rule:
    • When: Weight
    • is from: 10.001
    • rule cost is: 30
  1. Create a rule based on Shipping class and set:
  • When: Shipping class
  • matches: any
  • of: Non-shippable
  • and: Item
  • is
  • from: 1
  • Special action: Hide
  1. Add the next one based on Weight and set:
  • When: Weight
  • is
  • from: 70
  • Special action: Hide
  1. Add one more rule, but based on Item this time and set:
  • When: Item
  • is
  • from: 15
  • Special action: Hide
  1. Move the rules you’ve just created in step #2, #3 and #4 to the very top of the rules table.
special action HIDE


When your customer places an order which doesn’t contain a product with Non-shippable shipping class, the summed up weight of the ordered products is less than 70 kg and the order contains 14 items or less, the shipping cost will be calculated based on weight. However, when the order includes at least 1 product with Non-shippable shipping class, summed up weight of the ordered products exceeds 70 kg or the order contains 15 products or more, this shipping method will be automatically hidden, e.g.:

  1. If he orders 3 products and their summed up weight is 9 kg, the shipping cost is $15.
  2. If he orders 3 different products but 1 of them has the Non-shippable shipping class assigned which makes it necessary to be picked up personally from the warehouse, this shipping method becomes hidden.
  3. If he orders 5 products and their summed up weight is 75 kg, this shipping method dissappears from the cart/checkout and it’s unavailable to choose.
  4. If he orders 20 products this shipping method remains hidden, not being available to select as well.

Wondering how it will work live?

Scroll to Top