How to rename a delivery option if it becomes free after applying a shipping rule to it?

How to rename a delivery option if it becomes free after applying a shipping rule to it?

Keep in mind that the Shipping Rules extension can only adjust the cost of the existing shipping method, but it has no functionality to change the method name. However, there is a workaround that can help you achieve the required result using the Shipping Restrictions extension and the default Magento Free Shipping method.


Having Shipping Restrictions installed, it will be possible to allow the Free Shipping option for all of the orders (making the Minimum Order Amount = 0),  and hide it with the help of the Shipping Restriction rule until the cart reaches a certain threshold, or any other cart conditions are met.

EXAMPLE

Let's say, you would like to offer the Free Shipping method only for the UK orders when the subtotal reaches $100, and there is at least one product from the Bag category added to the cart. To begin with, navigate to Magento Admin Panel → Stores → Configuration → Sales → Shipping Methods and adjust the Free Shipping method settings, making this delivery option available for any orders: 


Then, move on to configuring a shipping restriction at Magento Admin Panel > Sales > Shipping Restrictions > Add New. Here is how such restriction rule is going to look in the backend, it will hide the default Free Shipping option if all three conditions aren't met at the same time:
     
When the restriction rule is active, the Free Shipping option will not be visible on the frontend if at least one of the required conditions is missing. In this example, the cart contains a bag, and order subtotal is greater than $100, but the shipping country is not the UK, so there's no Free Shipping option:




However, as soon as shipping country is set to the UK, the Free Shipping option appears as expected: