Shopify Functions explained

DefinitionShopify Functions are small programs, compiled to WebAssembly and deployed as part of an app, that Shopify runs at specific points in checkout and order processing to apply your own logic: discounts, which delivery and payment options appear, cart and checkout validation, order routing and more. They replaced Shopify Scripts, which was retired on 30 June 2026.

What they can do

  • Discounts. Product, order and shipping discounts with your rules: tiers, bundles, customer segments, combinations.
  • Delivery and payment customisation. Hide, rename or reorder shipping and payment options by cart, customer, address or market.
  • Validation. Block or limit checkout when a rule is broken: quantity limits, address rules, B2B constraints.
  • Operations. Routing of fulfilment and other backend decisions, depending on the Function type Shopify offers.

How they differ from Scripts and apps

Scripts were Ruby edited in the admin and run with few limits. Functions are code in your app, versioned and tested like any software, running on Shopify's infrastructure under strict budgets for time and instructions, which is what makes them fast and reliable. Compared with an app that injects into the theme, a Function runs inside checkout itself and adds no storefront weight.

What they cannot do

Call external services at runtime, run for long, or process unbounded data. Anything a Function needs must be available in its input or precomputed into metafields. That constraint is a feature: checkout stays fast and predictable.

When to build one

When the rule is genuinely yours and no well-maintained app expresses it, when the cost of subscriptions and glue exceeds the cost of building, or when the logic must be auditable. For standard patterns, a discount app built on Functions is often the better buy. How we decide.

Who can use them

Custom Functions for discounts, delivery and payment customisation are available to Shopify Plus stores. Public apps built on Functions can be installed more widely. Documentation: Shopify Functions.

Related.

Tell us what you are running. We will tell you what we would change.

Startups, small and mid-size brands, and listed companies. Engagements run from a two-week fix to a dedicated team. Your first call is with Abhishek Modi, our founder.

contact@mojitolabs.com +91 78275 37259

Shopify Plus Partner since 2015 · 4.9 on the Partner Directory

Reply within one business day.