Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Hide shipping for other than US country in Shopify Plus
puts Input.cart.shipping_address.country_code
if Input.cart.shipping_address.country_code != 'US'
Output.shipping_rates = Input.shipping_rates.delete_if do |shipping_rate|
true
end
end
BRAND = "Vendor_name"
if Input.cart.shipping_address.country_code != 'US' && Input.cart.line_items.any?{ | item | item.variant.product.vendor.include? BRAND}
Output.shipping_rates = Input.shipping_rates.delete_if do |shipping_rate|
true
end
end
Output.shipping_rates = Input.shipping_rates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.