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

Solved

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

meganatmetro
Excursionist
28 4 8

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? 

Accepted Solution (1)

James_Cirkl
Shopify Partner
14 1 1

This is an accepted solution.

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

View solution in original post

Replies 2 (2)

tobebuilds
Shopify Partner
556 42 150

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, Regios Discounts app (4.8 stars, 83 reviews, Built for Shopify)
- Custom discounts made simple
- "Just about any discount you'll ever need"
- Built by an ex-Google software engineer
- Often imitated, never duplicated

James_Cirkl
Shopify Partner
14 1 1

This is an accepted solution.

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