WooCommerce Shipping – Set a particular service as default in Cart

Often WooCommerce shop-owners want tomers.

For example, Roger sells bicycles and use XAdapter’s WooCommerce FedEx Shipping Plugin. He prefers “FedEx Ground” as ground services have a wider reach compared tomers 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.

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

How to set the cheapest shipping method as default?

Now, what if you want to use the below snippet:

Consider that Roger wants 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!

Try out great WooCommerce shipping solutions at XAdapter.

Comments (3)

  • Chadwick

    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.

    January 23, 2018 at 6:57 am
    • Anindo

      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!

      January 23, 2018 at 4:38 pm
    • Chadwick


      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!

      February 3, 2018 at 4:20 am

Comments are closed.