New Shopify Certification now available: Liquid Storefronts for Theme Developers

Best way to hide Local Pickup option for specific customers. Scripts being deprecated.

meganatmetro
Excursionist
25 4 4

We currently are using Shopify Scripts to allow customers who have placed at least 5 previous orders, to view an in-store pickup option, though come next year, Shopify Scripts will be deprecated and we must find another way around this. I have set up a Flow to add a boolean metafield for customers who meet this criteria. Does anyone know of an app or another solution that will only show this specific shipping rate depending on if this metafield is TRUE? 

Replies 2 (2)
tobebuilds
Shopify Partner
151 9 50

You can probably use the Delivery Customization Function API for this.

 

You can check metafield values using `input.cart.buyerIdentity.customer.metafield(...)`

 

And then return a `HideOperation` to hide the in-store pickup shipping rate to anyone who doesn't have the desired metafield.

 

Founder / Developer, Regios Technologies, Inc.
Install my automatic discounts app
DM me for custom app development and consulting.
James_Cirkl
Shopify Partner
14 0 0

You can't currently change local pickup using delivery customizations per this documentation

https://shopify.dev/docs/api/functions/reference/delivery-customization

 

Screenshot 2023-11-21 121624.png