Solved

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

meganatmetro
Excursionist
28 4 7

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
292 14 79

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.

 

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