This is not directly possible in Shopify’s settings, you can do it by using our app Releasit Cash On Delivery that you can install for free from the Shopify App Store here: https://apps.shopify.com/cash-on-delivery-fee
After you install the app go on the Limit COD page and you will find the option to disable COD for local pickup here:
With this option active, your COD payment method will not be visible for customers using local pickup.
The app is completely free to install and works on all Shopify plans and we also offer 24/7 support, so if you have any questions or you need help feel free to contact us from there!
If you want to control which payment methods are shown, like turning off COD (Cash on delivery) for pickup orders, you might want to check out our app Zapiet - Pickup + Delivery
With our app, you can customize which payment methods are displayed. Plus, we offer additional features such as:
Allowing customers to pick a date and time for pickup
Disabling specific products for pickup
Setting preparation time so you have enough time to get your products ready
Blackout dates, especially handy during busy holiday times