Skip to content

Instantly share code, notes, and snippets.

@omeome762
Last active April 2, 2017 13:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save omeome762/263ac2fdc2987df45603a892cf55428d to your computer and use it in GitHub Desktop.
Save omeome762/263ac2fdc2987df45603a892cf55428d to your computer and use it in GitHub Desktop.
Free Shipping script by Digital Develop for Shopify Plus
MESSAGE = "Free Standard Shipping" #promotional message
Input.shipping_rates.each do |shipping_rate|
next unless shipping_rate.source == "shopify"
next unless shipping_rate.name == "Free Standard Shipping"
shipping_rate.apply_discount(shipping_rate.price, message: MESSAGE)
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