It seems to not be possible at the moment, and I haven't been able to find an app tackling this problem.
Most typical use is when merchants offer local delivery, then they also offer to pay on delivery. But if the customer pick a standard shipping method with a third party shipper, then they are unrelated and have no way to collect the money, so the idea would be to filter Cash on Delivery (COD) payment method based on the shipping method selected in the delivery step. Does anyone have an alternative idea for this case?
Thanks for your attention
Like you said, unfortunately it's not possible to hide the Cash on Delivery option based on any conditon unless your store is on the Shopify Plus plan.
If you need Cash on Delivery only for local delivery a good alternative to solve this issue would be to use a separate order form for local delivery orders and completely remove the Cash on Delivery option from Shopify's normal checkout. This way if your customers want standard shipping they can use the normal checkout and they won't be able to pay with Cash on Delivery and if they need local delivery they can use the order form.
To do this you can install for free our new app Releasit COD Order Form: https://apps.shopify.com/releasit-cod-order-form
Then if you contact our support from the app I can help you setup your store to make sure your customers can place local delivery orders only from the form!
Hope this helps! If you have doubts or questions don't hesitate to write me back!
Thanks for your reply. I might consider it when I'm at it again (that's for a merchant). If you can manage to set a demo store, that would be very helpful to actually visualize and interact with this feature.