How to hide all other shipping methods when Free Shipping and Local Pickup available on the cart page

How to hide all other shipping methods when Free Shipping and Local Pickup available on the cart page

In the online business scenario too, local pickups are becoming common these days.

Customers save some money while businesses save time & delivery costs. So, alongside free shipping, you might want to hide all shipping methods for free pickups too. Use this option.
Example:-
An online business had free shipping option for people from New York State, while local pickup option for the people from Albany. Now, if someone belongs to Albany, it simply
means that he belongs to the NY state. So, if you will enable the first option (i.e. Hide all shipping methods when free shipping is applicable), your buyers won’t be able to utilize local pickup facilities.
What to do then? Choose the second option (i.e. hide all shipping methods when free shipping or local pickup is applicable).
Thereafter, your customers will see the options for free shipping as well as a local pickup in that certain area. Isn’t that what you wanted?