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.