Search Knowledge Base by Keyword

WooCommerce Shipping – Set a particular service as default in Cart

In this article, we will guide you how to set a particular shipping service as the default shipping method when using the WooCommerce FedEx Shipping Plugin with Print Label.

Often WooCommerce shop-owners want to provide a default shipping method to their customers. For example, Roger sells bicycles and use WooCommerce FedEx Shipping Plugin. He prefers “FedEx Ground” as ground services have a wider reach compared to any other shipping methods. But he cannot show only ground service as there may be customers who sometimes want other options (say a priority overnight delivery).

How to set a particular shipping service as default in WooCommerce shipping?

It is easy! Now, you can easily do that using the below code snippet.
Just copy the code and paste it in Appearance –>Editor –> functions.php.

As per the above snippet, FedEx Ground should be the default shipping method. Before implementing our solution, “FedEx First Overnight” was shown as default.
fedex overnight

After implementation of this solution, “FedEx Ground” is being shown as default!

fedex shipping

How to set the cheapest shipping method as default?

Now, what if you want to set the cheapest service as the default one? We have the perfect solution for that too! You just need to use the below snippet:

Consider that Roger wants to introduce a flat rate for customers from Georgia as his warehouse is located at Atlanta. So it becomes easy and cheap for him to ship goods to any location in Georgia. As a consequence of this, he decides to show the default shipping method as the cheapest one (the Flat Rate service in this case).

After incorporating the above solution, the plugin simply selects the flat rate by default!
cart page

 

Last Updated On September 21, 2018

3 thoughts on “WooCommerce Shipping – Set a particular service as default in Cart

  1. Chadwick says:

    How do I set UPS Ground as the default?

    Local pick-up is showing first on the list and I keep having customers accidentally choosing it.

    • Anindo
      Anindo says:

      Hi Chadwick,

      You can automatically allow the plugin to select the shipping method which you intend to. Here is a code snippet which will by default put the selection for that shipping method. You just need to provide the value of the shipping method in the snippet and then paste it in Appearance –> Editor –> functions.php.

      Hope this helps!

    • Chadwick says:

      Anindo,

      I tried chaning “Fedex” to “UPS” in the code above but it did not work. Can you tell me what the specific code would be to make UPS Ground the default selection.

      Many Thanks!

Comments are closed.