Shopify glossary
Shopify Functions
Short answer
Shopify Functions are small pieces of custom backend logic that run on Shopify's own infrastructure. They let a store customize discounts, delivery and payment options, cart validation and bundles, and they replace Shopify Scripts. Functions ship inside apps: public apps work on any plan, while custom apps with Functions need Shopify Plus.
What Functions can customize
Each Function plugs into a specific Shopify API:
- Discounts: tiered, bundle, buy-X-get-Y or customer-specific discount rules.
- Delivery customization: hide, rename or reorder shipping options.
- Payment customization: hide or reorder payment methods, for example removing cash on delivery above an order value.
- Cart and checkout validation: block checkout when rules aren’t met, such as minimum quantities for wholesale buyers.
- Cart transform: build bundles and expand or merge cart lines.
How they differ from apps that call the API
A normal app talks to Shopify from its own server. A Function runs inside Shopify at the moment a cart or checkout is calculated, so it’s fast and can’t go down with an outside server. The trade-off is strict limits on instruction count, memory and what data a Function can read.

When to use one
If an app in the App Store already does what you need, use it. When your rules are specific to your business, such as wholesale pricing, regional shipping rules or custom bundles, a custom Function in a private app is usually the cleanest answer.
Questions we get
Are Shopify Functions the replacement for Shopify Scripts?
Yes. Scripts were a Plus-only Ruby feature that Shopify retired in 2026. Functions cover the same jobs (discount logic, shipping and payment rules) with better performance and support on more plans.
What languages are Functions written in?
Functions compile to WebAssembly. Shopify supports writing them in JavaScript or Rust, and they must run within Shopify's strict performance limits.
Related
Keep reading
- Shopify Flow Shopify Flow explained: Shopify's free automation app, how triggers, conditions and actions work, which plans get which features, and when to go custom.
- Shopify Liquid Liquid explained for Shopify brand owners: the template language behind every Shopify theme, how objects, tags and filters work, and when you need a developer.
- Moving from Shopify Scripts to Functions: what to migrate first and how Shopify Scripts stopped running on June 30, 2026. What to rebuild first as Shopify Functions, how each Script type maps, and how to test it.