Tested Updated Trending Perfect rating

Custom Shipping Methods for WooCommerce

(1 customer review)

From: $19.99 / year

Add custom shipping methods to WooCommerce.

Clear

Description

With Custom Shipping Methods for WooCommerce Pro plugin you can add custom shipping methods to WooCommerce.

Custom Shipping Methods for WooCommerce - Custom Shipping General Settings

In addition to standard WooCommerce cost calculation shortcodes ([qty], [cost], [fee]) you can also use [weight] and [volume] shortcodes.

The plugin also includes:

  • [costs_table] shortcode for the table rate shipping,
  • [distance] shortcode for distance based cost calculation,
  • options to set free shipping minimum order amount,
  • options to set min and max cost limits,
  • options to set custom shipping methods frontend icons and descriptions,
  • min/max cost/weight/volume/quantity method availability options.

Costs Table

[costs_table] shortcode has two attributes: prop and table.

prop attribute can be: volume, weight, qty, cost or distance.

table attribute sets costs based on prop attribute’s value, in min_prop-cost format.

Costs Table by Items Volume

Items volume is calculated by multiplying each item’s width, height and length.

[costs_table prop="volume" table="0-10|50-50|100-125.5"]

This example will set costs according to this table:

Volume Shipping Cost
from 0 and below 50 10
from 50 and below 100 50
from 100 125.5

Costs Table by Items Weight

[costs_table prop="weight" table="0-10|50-50|100-125.5"]

This example will set costs according to this table:

Weight Shipping Cost
from 0 and below 50 10
from 50 and below 100 50
from 100 125.5

Costs Table by Items Quantity

[costs_table prop="qty" table="0-20|10-10|20-0"]

This example will set costs according to this table:

Quantity Shipping Cost
from 0 and below 10 20
from 10 and below 20 10
from 20 free

Costs Table by Order Amount

[costs_table prop="cost" table="0-20|10-10|20-0"]

This example will set costs according to this table:

Order Amount (i.e. Order Cost) Shipping Cost
from 0 and below 10 20
from 10 and below 20 10
from 20 free

Costs Table by Distance

Distance is calculated same as in [distance] shortcode. Also same attributes (key, default_distance, units, src, debug) are applied.

[costs_table prop="distance" table="0-10|50-50|100-125.5" key="BIzbSyBNBNR9yi3vTgC33oXSpwQftScNSmO-fjc" default_distance="100" units="km"]

* Please note that key from example is not a valid key – you need to get your own free key here.

This example will set costs according to this table:

Distance Shipping Cost
from 0 and below 50 km 10
from 50 and below 100 km 50
from 100 km 125.5

Distance based Cost Calculation

[distance] shortcode has five possible attributes:

  • key – this is a required attribute. Plugin uses Google Distance Matrix API to calculate the distance, so you need to get your free API key here. Please note that you need to check “Routes” when getting your key from Google.
  • default_distance – this is a default distance for shipping (in case if customer didn’t enter his address yet or distance can’t be calculated). Default: 0.
  • units – units in which distance is calculated. Possible values: m for meters (default), km for kilometers and mi for miles.
  • src – source point (origin). By default it’s automatically retrieved from your shop’s settings from “WooCommerce > Settings > General > Store Address”. If you wish to set it manually – correct format is: address, city postcode, country.
  • debug – if set to yes, will output debug information in “WooCommerce > Status > Logs”. Default: no.

[distance] Example

1.5*[distance key="BIzbSyBNBNR9yi3vTgC33oXSpwQftScNSmO-fjc" default_distance="15" debug="yes" units="km"]

* Please note that key from example is not a valid key – you need to get your own free key here.

Availability Options

For each custom shipping method you can optionally set min/max cost/weight/volume/quantity method availability options.

Custom Shipping Methods for WooCommerce - Availability Settings

Shipping Class Costs Options

As in standard WooCommerce shipping methods, you can optionally set shipping class costs, i.e. costs that are based on the product shipping class.

Custom Shipping Methods for WooCommerce - Shipping Class Costs Settings

General Options

General plugin options are located in “WooCommerce > Settings > Custom Shipping Methods”.

Custom Shipping Methods for WooCommerce - General Options

Admin Settings: Admin title
Sets custom shipping’s admin title. Visit “WooCommerce > Settings > Shipping” to set each method’s options.
Default: Custom shipping
Frontend Settings: Trigger checkout update
Will trigger the checkout update on any input change. This is useful if you are using cost calculation by distance to the customer.
Default: no
Frontend Settings: Add to zero cost
Will add text to custom shipping cost on frontend in case if it’s zero (i.e. free).
Default: no
Frontend Settings: Add to zero cost: Text
Text to add to zero cost. Ignored if “Add to zero cost” option above is disabled.
E.g.: : <span style="color:green;font-weight:bold;">Free!</span>
Default: None
Icons & Descriptions: Enable section
Enables icons and descriptions options for custom shipping methods. Visit “WooCommerce > Settings > Shipping” to set each method’s icon and description.
Default: no
Icons & Descriptions: Icon template
Sets template for the icons. Replaced value: %icon_url%.
Default:
<img style="display:inline;" src="%icon_url%">
Icons & Descriptions: Description template
Sets template for the descriptions. Replaced value: %desc_text%.
Default:
<p style="font-size:small;font-style:italic;">%desc_text%</p>
Icons & Descriptions: Final template
Sets final template. Replaced values: %icon%, %label%, %desc%.
Default:
%icon%%label%%desc%

1 review for Custom Shipping Methods for WooCommerce

  1. Sjors

    Perfect plugin, just what I needed. And thanks to Tom for quick support.

Add a review

Your email address will not be published. Required fields are marked *

48 thoughts on "Custom Shipping Methods for WooCommerce"

  1. Hi,
    I am not sure if I am missing something but can’t work out the GST (Goods & Service Tax) for the shipping method.
    My store currently has product prices that have tax included (by law in Australia this is needed). I have added a lot of code for all different postal zones in Custom Shipping Method and added the shipping prices GST included (as per the rest of the shop). Problem is that in when I add Tax Status (Taxable) it adds tax to that shipping making the cost of shipping too much. I have tried to change WooCommerce > Tax Options for shipping but nothing I do makes the figure GST inclusive and added to Taxable total.
    Does Custom Shipping Method’s shipping costs need to be added in ex-tax, then taxable selected? So opposite to how I have the woocommerce product tax set up?

    One zone has these custom shipping prices:
    [costs_table prop=”qty” table=”0-15.35|11-19.95|13-21.40|15-22.85|16-33.00|31-34.45|33-35.90|35-37.35|37-38.80|39-40.25|41-55.60|51-60.20|53-61.65|55-63.10|56-73.25|71-74.70|71-74.7|73-76.15|75-77.60|77-79.05|79-80.50|81-95.85|91-100.45|93-101.90|95-103.35|96-113.50|111-114.95|113-116.40|115-117.85|117-119.30|119-120.75|120-120.75″]

    12 zones all with that amount of prices, this is why i don’t want to change GST amounts for all shipping.

    1. Hi Valentino,

      If I understood it correctly – yes, custom shipping cost should be set without tax. If you check the description tip near the “Cost” option, it says “Enter a cost (excl. tax) or sum…”. Generally, we did that because the same cost settings rules are used in standard WooCommerce “Flat rate” shipping settings (i.e. also excluding tax).

      Not sure if it will help, but you don’t want to change all the prices, you could just divide the final value to exclude the tax. For example, if your tax is 20%, then you could just add /1.2 at the end of your formula, i.e.:

      [costs_table prop="qty" table="0-15.35|11-19.95|13-21.40|15-22.85|16-33.00|31-34.45|33-35.90|35-37.35|37-38.80|39-40.25|41-55.60|51-60.20|53-61.65|55-63.10|56-73.25|71-74.70|71-74.7|73-76.15|75-77.60|77-79.05|79-80.50|81-95.85|91-100.45|93-101.90|95-103.35|96-113.50|111-114.95|113-116.40|115-117.85|117-119.30|119-120.75|120-120.75"]/1.2

      Hope that helps.

  2. I’m hoping you can help me with an issue I’m having. I have a few products with a free shipping class, however the custom distance delivery price still shows on these products as an option for shipping? Can you please show me how to overcome this?

    Many thanks in advance,

    1. We did solve it privately, but in case If anyone else has a similar question – the solution was to move shipping cost calculation formula from general “Cost” to “No shipping class cost” option.

  3. Hi,

    I would like to add a maximum limit to my shipping price.

    I tried that with the “max cost limit” option but it’s not working.

    Waiting for your advices.

    Thanks

    1. In case if anyone else has a similar question – the problem was in product shipping class usage. In plugin v1.4.2 we’ve added a new “Limits calculation” select option to “Shipping class costs” settings section. This option has three possible values:

      * Per class: Check limits for each shipping class individually (default)
      * Per order: Check limits for final cost only
      * All: Check limits for each shipping class individually and then for final cost

      Switching it either to “Per order: …” or to “All: …” solved the task.

  4. Hi, I’ve just bought the shipping distance plugin. I’m really sorry but I have no idea how to implement this on the website. I just want these basic rules setting up: 0-25 MILES FREE, 25-50 MILES £30, 50-75 MILES £50, 75-100 MILES £75 100+ MILES £100

    Can you please instruct me how? Your help would be greatly appreciated.

    Thank you,

    Dan

    1. Hi Dan,

      Here the shortcode you need to put in your custom shipping’s “Cost” field:

      [costs_table prop="distance" table="0-0|40.2336-30|80.4672-50|120.701-75|160.934-100" key="AIzaSyC4OkGgzRYLc80yEYzuhU7USYFzwXzzzzz" default="100" units="km"]

      The most important thing – you need to replace key (i.e. AIzaSyC4OkGgzRYLc80yEYzuhU7USYFzwXzzzzz) with your own key, you need to get from https://developers.google.com/maps/documentation/distance-matrix/start#get-a-key – it’s free.

      Also, as you can see, I’ve replaced miles with distances in kilometers (25 miles = 40.2336 km, 50 miles = 80.4672 km, 75 miles = 120.701 km, 100 miles = 160.934 km). If that’s an issue – I can add miles to our plugin today. This won’t be hard to do.

    2. Hi again, Dan,

      Just wanted to let you know that we’ve released new plugin v1.4.0 today, where I’ve added miles (mi) to the [costs_table] shortcode, so now you can set:

      [costs_table prop="distance" table="0-0|25-30|50-50|75-75|100-100" key="AIzaSyC4OkGgzRYLc80yEYzuhU7USYFzwXzzzzz" default_distance="100" units="mi"]

      Also, I’ve noticed that you may need to enable “Trigger checkout update” option in “WooCommerce > Settings > Custom Shipping Methods”, so that shipping cost is updated immediately if a customer changes his address on the checkout page.

      And last note – if you want to show shipping cost only after customer has entered his address, you may want to enable “Hide shipping costs until an address is entered” option in “WooCommerce > Settings > Shipping > Shipping options”.

  5. Good evening,
    I am looking for a solution to deduct the cheapest shipping costs if a customer buys 4 items.
    Deduct the least expensive flat price on the purchase of 4 products in are basket.
    Do you think this is possible with your plugin
    Thank you in advance for your answer
    Thank you

    1. Hi Alan,

      I’m not sure if I understood the task correctly. Do you mean that if, for example, the customer adds 4 products (product A, product B, product C and product D) to the cart and if, for example, product’s A price is the lowest of 4 products, then we need to deduct product’s A price from the totals, is that correct?

    2. Hello,
      it is exactly that
      you have understood very well,
      I can not find a solution to this problem
      Clients often have requests that are not expected
      Sorry to get back late
      Thank you

    3. Hello,
      I think I was a little fast.
      The idea is to deduct the cheapest shipping price on 4 purchases made. Each product has a flat rate shipment.

      this is possible
      Thank you
      Alan

    4. Hi Alan,

      I’m sorry but I’m still not sure if I understand it correctly. Maybe you can give me an example? And by “… on 4 purchases made…” – do you mean 4 different orders?

    5. Hello,
      Let’s take an example
      I order :
      • a product A – (fixed price € 2)
      • a product B – (fixed price of 3 €)
      • a product C – (fixed price 4 €)
      • a product D – (fixed price 5 €)
      Normally I will have to pay in Postage 2 € + 3 € + 4 € + 5 € = 14 €
      But as I ordered 4 products – I would like to remove the price of sends the cheapest one ie 2 €
      If who makes 3 € + 4 € + 5 € = 12 €
      Sorry to mis explain me
      Thank you
      Alan

    6. Hi Alan,

      By shipping’s “fixed price” for a product – you mean you are using product “shipping classes”, correct?

    7. Good evening,
      yes I use “shipping classes” of the plugin to set lump sum shipping prices
      cordially

    8. Hi Alan,

      Hopefully I’ve understood you correctly. First of all – please update to the latest plugin version 1.4.0 that we have just released. Now as your task is rather specific, I’ve decided to add a filter, so you could add a PHP snippet to your site. The snippet is in the “Developers” tab on the current page. Please take a look and let me know if something is not working as expected or if you have any questions.

      P.S. And if you like the plugin, please consider leaving me a rating.

    9. Too bad not being able to put six stars to this awesome plugin.
      I searched a lot of plugin for functions
      dispatch management.
      Custom Shipping Methods for WooCommerce is the best.
      Thanks Tom

    10. Thank you, I really appreciate it!

  6. Hi,
    since the last update (1.3.1),
    the plugin malfunctions, I can’t select the option “based on”
    So, my delivery options aren’t found…
    Can you help me please ?
    Thank’s

    1. Hi,

      Thanks for reporting, however, I’ve just tested it on my server but unfortunately couldn’t reproduce the issue – custom shipping seems to be working fine here. I’m not really sure I understood “based on” option – where is this option located?

      P.S. If you wish you can create/share an admin account to your server so I could log in and check what’s going on (my private email is [email protected]).

  7. Hi Tom,

    Wondering if your plugin can provide this level of shipping customization

    First class shipping $3.50 for the first item and $1.00 for each additional item
    Priority shipping $8.50 for the first item and $3 for each additional item
    Overnight shipping $25 for the first item and $9 for each additional item

    International shipping $14 for the first item and $8.50 for each additional item

    1. Hi Chris,

      Yes, that is possible. You need to add 4 custom shipping methods and for each set Cost accordingly:

      3.5+([qty]-1)*1
      8.5+([qty]-1)*3
      25+([qty]-1)*9
      14+([qty]-1)*8.5

      Hope that helps. Please let me know if you have any questions.

  8. Hi, just got the plugin installed but it does not seem to work, I sure I am missing some thing. here is the code I used
    [costs_table prop=”cost” table=”0-29.99|7.99-49.99|9.00-74.99|13.99-99.99|17.00-149.95|21.99″]

    looking for this
    We offer free shipping on orders of $150.00 or more.
    Our shipping chart is as follows.

    0.00 – 29.99 $7.99

    30.00 –49.99 $9.00

    50.00 –74.99 $13.99

    75.00 —99.99 $17.00

    100.00—149.99 $21.99

    testing can be done at http://www.farmhousedecor.com cart is live

    1. even as a programmer I find the rates hard to understand I would expect or like to see something easy like

      [costs_table prop=”cost” table=”0-29.99=7.99|30.00-49.99=|9.00|50.00-74.99=13.99|75.00-99.99=17.00|100.00-149.99=21.00″] if you cant use the = since its a operator use- but pipe on each rate.

      Rick

    2. I re did the code and I am using this now [costs_table prop=”cost” table=”1-7.99|29.99-49.99|9-74.99|13.99-99.99|17-149.99|21.99″] now I get “there are no shipping options available for this address”

    3. Hi,

      Sorry for a late reply. According to your table, I believe what you need is:

      [costs_table prop="cost" table="0-7.99|30-9|50-13.99|75-17|100-21.99|150-0"]

      P.S. “there are no shipping options available for this address” message appears because you need to add some value to 21.99, i.e. it always has to be in min_prop-cost format.

      P.P.S. Regarding your proposed format (...0-29.99=7.99|30.00-49.99=...) – will be trying to add it as an alternative format in next plugin version.

    4. Hi,

      Just wanted to let you know and if anyone else has similar questions – as requested we have finally added an alternative table format to the [costs_table] shortcode. You need to add table_format attribute to the shortcode and set it to range, e.g.:

      [costs_table prop="cost" table="0-30=7.99|30-50=9|50-75=13.99|75-100=17|100-150=21.99|150-=0" table_format="range"]
  9. hi,

    I was wondering if this plug -in can handle different free shipping tresholds. We are sending by post and dhl, however, the treshold for post to be free is of course lower then dhl.

    Thanks

    Sam

    1. Hi Sam,

      Wasn’t possible, but I’ve just added it to the plugin. After you update to new version 1.3.1, you will find new Free shipping minimum order amount option in methods’ settings. Unfortunately, this option is available in Pro version only.

      P.S. If you are calculating shipping cost based on order cost, you can also use [costs_table] shortcode for minimimum free shipping order amount, e.g.:

      [costs_table prop="cost" table="1-10|10-5|20-0"]

      Hope that helps. Please let me know if you have any questions.

  10. Hello
    How to calculate with a table if we charge client per km of delivery?
    Thanks

    1. Hi Konstantin,

      The idea is really interesting and I would gladly implement it in plugin, however there is one major problem – plugin would need to know the distance between your shop and the customer. For plugin to calculate the distance, it would need to know the coordinates (i.e. latitude and longitude) of both your shop and the customer. In standard WooCommerce setup, customer enters ZIP code, so we could try go get latitude and longitude from ZIP code, but this would definitely require some external API, which would connect ZIP codes with coordinates. If you have any thoughts on how to solve this – please let me know.

      Simple solution would be acceptable if your shop deliver to small (or at least finite) number of ZIP codes – in this case we could manually pre-fill the table of ZIP codes -> distances. Hope you get the idea…

    2. We deliver by cars, cars use roads and only distance we can get – from direction of any mapping service: google, yandex, waze. When you install woocommerce you fill an address of your store/warehouse, when client place order – they fill the address of delivery. When you have 2 addresses you can calculate distance between them with any maps API, google distance matrix for example – https://developers.google.com/maps/documentation/distance-matrix/intro
      If you can implement it in a plugin – I’ll be your first client who bought it :)) I think this plugin will be useful for any who make local delivery.

    3. Hi Konstantin,

      We’ve just released new plugin version 1.3.0. As suggested I’ve added calculation by distance, e.g.:

      1.5*[distance key="BIzbSyBNBNR9yi3vTgC33oXSpwQftScNSmO-fjc" default="15" debug="yes" units="km"]

      and/or

      [costs_table prop="distance" table="1-10|50-50|100-125.5" key="BIzbSyBNBNR9yi3vTgC33oXSpwQftScNSmO-fjc" default="125.5" units="km"]

      Unfortunately both shortcodes went to Pro version only, hope you understand.

      You can read more about these shortcodes in the “Description” tab.

      Please let me know if something is not working as expected or if you have any questions. Any feedback is highly appreciated.

  11. Hi,
    Thanks for this plugin,

    It seems the plugin desn’t consider the included or excluded VAT enter option (first option in Woocommerce > Settings > VAT).
    In fact, I use included VAT prices for my product whereas “Custom Shipping Methods for WooCommerce” still use excluded VAT .
    There is no problem in Woocommerce, but I use a connector with Odoo and it couldn’t understand that there are both included VAT for products and excluded VAT for the ship.

    So is it possible to input included VAT prices for the cost of a custom shipping method ?

    Thank you for your help.

    1. Hi Remi,

      You are correct – custom shipping cost should be set without VAT. If you check the description tip near the “Cost” option, it says “Enter a cost (excl. tax) or sum…”. We did that because same cost settings rules are used in standard WooCommerce “Flat rate” shipping settings (i.e. also excl. tax).

      I could probably add an option to set cost with VAT, however I’m not really sure I understand the task correctly. I mean – you could just precalculate shipping cost manually just once and enter it without VAT (e.g. if shipping cost is $100 with VAT and VAT is 20%, then you would enter 100 / 1.20 = $83.33 as custom shipping method cost) – wouldn’t that solve the issue? What am I missing?

      Also, as you’ve probably noticed, there is “Tax status” option in custom shipping method’s settings, so you can set if final shipping price for the customer should include or exclude VAT.

    2. Hi,

      Thanks for reply.

      I know you did that because same cost rules are used in standard Woocommerce settings.
      I already input shipping cost without VAT, but it’s not my issue.
      In fact, there is no issue with your plugin.
      I’m trying to get around another issue from an Odoo connector, and I think if I could input shipping cost with VAT included, it should resolve a part of the problem.

      And I don’t understand your last sentence.
      Because, the “Tax status” option can set if there is or not VAT for a cost… that’s different than input an included VAT price or an excluded VAT price.

      Certainly my request is not very clear because the goal is to resolve another problem, totally independant of your plugin.
      I only wonder if your plugin could process with an included VAT logic instead of an excluded VAT logic.

      Regards

    3. Hi Remi,

      Ok – please give me a couple of days to check if I can add an option to set custom shipping cost including VAT. Will get back to you about this asap.

      Regarding my previous note about “Tax status” – you are correct, this sets if VAT should be added to shipping cost in final calculation. Just thought maybe this may help you… Anyway, in case anyone else has question regarding “Tax status”: for example you set shipping cost to $10 and your VAT is 20%, then if you set tax status to “Taxable” you will get $12 as final shipping price and if you set tax status to “None” – final shipping price will be $10.

    4. Hi Remi,

      We’ve just released new plugin version 1.3.0. I didn’t add option to enter price with VAT, however I did add alg_wc_custom_shipping_methods_evaluate_cost_sum_evaluated filter that is applied just before the shipping cost is returned. So now you can modify the cost by adding something like this to your (child) theme’s functions.php file:

      add_filter( 'alg_wc_custom_shipping_methods_evaluate_cost_sum_evaluated', 'custom_modify_shipping_cost', 10, 1 );
      if ( ! function_exists( 'custom_modify_shipping_cost' ) ) {
      	function custom_modify_shipping_cost( $sum ) {
      		if ( WC()->cart->get_customer() && ! WC()->cart->get_customer()->get_is_vat_exempt() ) {
      			$sum = $sum * 1.21;
      		}
      		return $sum;
      	}
      }
      

      If you could give more info on when you need to add/remove VAT from cost – I could try to provide you with the exact code to add.

      Also if you wish, you can share an admin account to your site (WP and FTP) so I could login and help you with solving the task – my private email is [email protected]

      Hope that helps.

  12. hello
    Can it display Free instead of 0.00 when there is no cost?

    thank you

    1. Hi Sam,

      Thanks for the idea. Already working on this – will release new plugin version in a couple of hours or so.

    2. Hi again Sam,

      As promised, we’ve just released new plugin v1.2.1 (both Free and Pro). After updating please go to plugin settings (in “WooCommerce > Settings > Custom Shipping Methods”) and enable “Replace zero cost” checkbox there. You can also choose what text to display instead of $0.00: it can be empty (as with WooCommerce standard “Free shipping” method) or you can set some text (can be HTML), e.g.:

       - <strong style="color:red;">Free</strong>

      Please let me know if it’s not working as expected. And if you like the plugin, please leave us a rating.

  13. Hello,
    I bought the plugin “custom-shipping-methods-for-woocommerce-pro” . I want a new custom shipping method and I added it to woocommerce. I want to setup the following costs based on products weight.

    0-750 g 2.6€
    750-1750 g 3.2€
    1750-2750 g 3.9€
    2750-3750 g 4.4€
    3750-4750 g 5€

    I use the following shortcode:
    [costs_table prop=”weight” table=”0-2.6|750-3.2|1750-3.9|2750-4.4|3750-5|4750″]

    The problem is that the costs in the checkout page is 0.00. What I did wrong? Please help.

    Thanks in advance.

    1. Hi,

      There is last price missing in your shortcode (i.e. for the 4750 weight), so please try something like this:

      [costs_table prop="weight" table="0-2.6|750-3.2|1750-3.9|2750-4.4|3750-5|4750-6"]
  14. The costs table feature, the reason I purchased the plug-in, does not seem to work for me at all. Regardless of quantity it always charges the max rate.

    1. Hi,

      Maybe you could send me the exact [costs_table] value you are trying to use? I mean with your prop and table attribute values? Also if you wish you can create/share an admin account to your server (WP and preferably FTP), so I could login and check what’s going on (my email is [email protected]).

    2. In case if anyone else has similar issues – as we’ve figured out in private emails – there was a bug in plugin, which is now fixed in v1.2.0.

Leave a Reply

Your email address will not be published. Required fields are marked *

Changelog

1.5.1 - 13/11/2019

  • Dev - Shortcodes - [distance] - Returning default_distance at once when source or destination address is empty.
  • WC tested up to: 3.8.
  • Tested up to: 5.3.

1.5.0 - 23/10/2019

  • Feature - Shortcodes - [distance] - Rounding attributes added (rounding and rounding_precision).
  • Feature - Shortcodes - [distance] - Min and max distance attributes added (min_distance and max_distance).
  • Dev - Code refactoring.

1.4.3 - 03/10/2019

  • Dev - General - Frontend Settings - Add to zero cost - Admin settings descriptions updated.
  • WC tested up to: 3.7.

1.4.2 - 14/06/2019

  • Dev - Shipping class costs - "Limits calculation" option added.
  • Dev - Admin settings descriptions updated ("Free shipping min amount").
  • Dev - Minor code refactoring.

1.4.1 - 25/05/2019

  • Dev - General - Frontend Settings - Trigger checkout update - Now triggering checkout update only on billing_ and shipping_ input change.
  • Dev - General - Frontend Settings - Add to zero cost - Admin settings descriptions updated.

1.4.0 - 24/05/2019

  • Feature - Shortcodes - [costs_table] - table_format attribute added (defaults to min; other possible value: range) (and default_cost attribute added).
  • Feature - Shortcodes - [distance] - Miles (mi) option added to the units attribute (same applies to [costs_table prop="distance" ...]).
  • Dev - General - Frontend Settings - "Trigger checkout update" option added.
  • Dev - Shortcodes - [distance] - default attribute renamed to default_distance.
  • Dev - WC_Shipping_Alg_Custom - alg_wc_custom_shipping_methods_add_rate filter added.
  • Dev - WC_Shipping_Alg_Custom - evaluate_cost() function visibility changed from protected to public.
  • WC tested up to: 3.6.
  • Tested up to: 5.2.

1.3.1 - 09/02/2019

  • Feature - [costs_table] - cost property added (i.e. [costs_table prop="cost" ...]).
  • Feature - "Free shipping minimum order amount" option added.
  • Dev - [costs_table] - Code refactoring.
  • Dev - Admin settings restyled.

1.3.0 - 03/12/2018

  • Feature - "Min cost limit" and "Max cost limit" options added.
  • Feature - [distance] shortcode added.
  • Feature - distance prop added to the [costs_table] shortcode (i.e. [costs_table prop="distance"]).
  • Dev - Method settings descriptions updated.
  • Dev - alg_wc_custom_shipping_methods_evaluate_cost_sum and alg_wc_custom_shipping_methods_evaluate_cost_sum_evaluated filters added.

1.2.1 - 14/11/2018

  • Feature - "Replace zero cost" options added.
  • Dev - Code refactoring.

1.2.0 - 18/09/2018

  • Feature - "Method icon" and "Method description" options added.
  • Fix - [costs_table] shortcode fixed.
  • Dev - Admin settings restyled.

1.1.0 - 14/09/2018

  • Feature - Availability - "Min cost", "Max cost", "Min volume", "Max volume", "Min quantity", "Max quantity" options added.
  • Fix - Core - Checking if product has dimensions before calling get_height(), get_width() and get_length() in get_products_volume().
  • Fix - Core - Checking if product has weight before calling get_weight() in get_products_weight().
  • Dev - Default "Admin title" and "Method title" values updated.
  • Dev - Minor admin settings restyling.
  • Dev - Code refactoring.
  • Dev - POT file added.
  • Dev - Plugin description in readme.txt updated.
  • Dev - Plugin URI updated.

1.0.0 - 09/05/2018

  • Initial Release.

Free version

This plugin is a premium version of free "Custom Shipping Methods for WooCommerce" plugin.

Developers

If you need to modify custom shipping method's cost, there is a filter for that:

alg_wc_custom_shipping_methods_add_rate

For example, let's say you are using product shipping classes when calculating shipping cost and you need to deduct the least expensive shipping class amount from the final shipping cost for orders having 4 or more products. This is the code you would need to add to your (child) theme's functions.php file:

if ( ! function_exists( 'my_alg_wc_custom_shipping_methods_deduct_lowest_class' ) ) {
    /**
     * my_alg_wc_custom_shipping_methods_deduct_lowest_class.
     */
    function my_alg_wc_custom_shipping_methods_deduct_lowest_class( $rate, $package, $shipping_method ) {
        $min_products_count = 4;// Here you set how many products there should be in cart at least
        if ( ! isset( $package['contents'] ) || count( $package['contents'] ) < $min_products_count ) {
            return $rate;
        }
        $shipping_classes = WC()->shipping->get_shipping_classes();
        if ( ! empty( $shipping_classes ) ) {
            $found_shipping_classes = $shipping_method->find_shipping_classes( $package );
            $lowest_class_cost      = false;

            foreach ( $found_shipping_classes as $shipping_class => $products ) {
                // Also handles BW compatibility when slugs were used instead of ids
                $shipping_class_term = get_term_by( 'slug', $shipping_class, 'product_shipping_class' );
                $class_cost_string   = $shipping_class_term && $shipping_class_term->term_id ? $shipping_method->get_option( 'class_cost_' . $shipping_class_term->term_id, $shipping_method->get_option( 'class_cost_' . $shipping_class, '' ) ) : $shipping_method->get_option( 'no_class_cost', '' );

                if ( '' === $class_cost_string ) {
                    continue;
                }

                $has_costs  = true;
                $class_cost = $shipping_method->evaluate_cost( $class_cost_string, apply_filters( 'alg_wc_custom_shipping_methods_evaluate_cost_args_class', array(
                    'qty'  => array_sum( wp_list_pluck( $products, 'quantity' ) ),
                    'cost' => array_sum( wp_list_pluck( $products, 'line_total' ) ),
                ), $products ) );

                $lowest_class_cost = $class_cost < $lowest_class_cost || false === $lowest_class_cost ? $class_cost : $lowest_class_cost;
            }

            if ( $lowest_class_cost ) {
                $rate['cost'] -= $lowest_class_cost;
            }
        }
        return $rate;
    }
    add_filter( 'alg_wc_custom_shipping_methods_add_rate', 'my_alg_wc_custom_shipping_methods_deduct_lowest_class', PHP_INT_MAX, 3 );
}

Prices & Licenses

Single siteUnlimited sites
1 year[buy] $19.99 / year[buy] $29.99 / year
Lifetime[buy] $39.99[buy] $59.99

Installation and Updates

  • Buy the plugin 🙂
  • Download plugin's zip to your computer (you will receive an email with download link, or you can always download the plugin from your account).
  • Go to "Admin Dashboard > Plugins > Add New > Upload Plugin" and browse for downloaded zip file.
  • If plugin is successfully installed - you should see it added to the Plugins list.
  • To keep WPFactory items up to date, please install WPFactory Helper plugin and enter your site key.

Refunds

We want to ensure that you are 100% happy with your purchase, so if you feel the product(s) you purchased are not the best fit for your requirements and you attempted to resolve issues with product's author, we are offering 30 day money back guarantee refund policy.