In my experience around shipping in WooCommerce I’ve found that there are countless different needs for setting up shipping cost. One that comes back from time to time is setting up a minimum or maximum shipping cost to shipping rates. In this post I’ll show you ways on how you can setup these caps on your shipping cost.
Setting up a maximum shipping cost
Depending on your needs you may want to setup a maximum shipping cost for all shipping rates. In the code snippet below it will put the maximum shipping amount you entered on all the shipping rates and automatically adjust the shipping rates.
Apply maximum shipping cost to certain shipping rates
Of course setting up a maximum shipping cost for all shipping rates may not go well if you have some sort of for example a setup with both standard and expedited shipping. This code snippet will allow you to only setup the maximum to certain shipping rates based on their shipping rate ID.
Setting up a minimum shipping cost
If you want to setup a minimum shipping cost, the example below will setup a minimum shipping cost of $10 for each shipping rate.
Setup minimum shipping cost to certain shipping rates
Just like the maximum shipping cost example, setting up a minimum cost for each rate may not be what you need. In the example below you can setup the minimum shipping cost per shipping rate. You can enter multiple shipping rates in the comma separated list if want to.
If you’re using my Advanced Shipping plugin and want to setup the min/max shipping cost based on the shipping rate IDs, you can find the IDs of the shipping rate in the URL when editing a shipping rate. For example, if the URL is
123 would be the shipping rate ID.
Please leave a comment below if this was helpful for you, or if you ran into any challenges 🙂