Hi Everyone,
Shopify provides an option for pickup at a store, which shows all available store locations on the checkout page.
I wanted to check if it’s possible to hide certain pickup locations dynamically based on specific cart properties.
For example, if a cart property has a particular value (like a specific delivery type ), then only certain stores should be shown as available for pickup.
Is there a way to conditionally filter or hide pickup locations at checkout using custom code or checkout UI extensions?
Thanks in advance for any suggestions!
Hi @Urmi_Kothari
Have you looked into using the Delivery Customization Function API:
You should be able to work with the cart.delivery-options.transform.run target - the function’s input query reads cart.attribute(key: "delivery_type") to get the cart property value, and fetches all delivery options with the deliveryMethodType to identify pickup options (LOCAL / PICK_UP ). The function logic then compares each pickup location’s title against an allowed list (configured per delivery type via a metafield), and returns deliveryOptionHide operations for any pickup locations that shouldn’t be shown.