Shopify Scripts vs Shopify Functions: What Changed and Why
Shopify is replacing Script Editor with Functions — a fundamentally different architecture. Here's what merchants and developers need to understand about the shift.
The Short Version
Shopify Scripts (2016-2026) let Shopify Plus merchants write Ruby code that runs during checkout to modify prices, shipping, and payments. They're hosted by Shopify and edited in a browser-based Script Editor.
Shopify Functions (2023+) replace Scripts with a modern, sandboxed architecture. You write JavaScript (compiled to WebAssembly), deploy via the Shopify CLI, and target specific APIs like Discounts, Delivery Customization, or Payment Customization.
Deadline: Script Editor stops working June 30, 2026. All Ruby scripts will be disabled.
Architecture Comparison
| Feature | Scripts (Old) | Functions (New) |
|---|---|---|
| Language | Ruby (custom sandbox) | JavaScript → WebAssembly |
| Editor | Browser-based Script Editor | Local IDE + Shopify CLI |
| Deployment | Paste in admin, publish | shopify app deploy |
| Hosting | Shopify-managed | Shopify-managed (Wasm sandbox) |
| Execution | Full Ruby interpreter | Sandboxed Wasm (no network, no fs) |
| Performance | 5-10ms typical | <5ms (Wasm is fast) |
| Data Access | Full cart object (Ruby) | GraphQL input query (you define what you need) |
| Network Access | None | None (but can read metafields) |
| Plan Required | Shopify Plus only | All plans (via apps) |
| Availability | Deprecated June 2026 | Active, expanding |
What Shopify Functions Can Do That Scripts Couldn't
- Available to all plans. Scripts were Plus-only. Functions work through apps available to all merchants.
- Faster execution. Wasm sandboxes execute in <5ms. Ruby scripts were slower and harder to optimize.
- Better developer experience. Write in your preferred IDE. Test locally. Version control. CI/CD.
- Type-safe inputs. GraphQL input queries mean you know exactly what data you'll get.
- Metafield-driven configuration. Store config in metafields, change behavior without redeploying code.
What Scripts Could Do That Functions Can't (Yet)
- Free-form price modification. Scripts could set any price. Functions have more structured discount types.
- In-browser editing. Script Editor was simple for non-developers. Functions require CLI and deployment.
- Dynamic metaprogramming. Ruby's
eval,define_method, etc. don't translate to Functions.
API Mapping: Script Type → Function Target
Line Item Scripts → Multiple APIs
This is where it gets complex. A single Line Item Script might map to Product Discounts (price changes), Order Discounts (order-level rules), Cart Transform (bundles, GWP), or Cart Validation (blocking items). ScriptShift detects which patterns map where.
Shipping Scripts → Delivery Customization
Relatively clean mapping. Hide, rename, and reorder shipping rates. Note: you cannot change rate prices directly (use shipping discounts for that).
Payment Scripts → Payment Customization
Cleanest mapping. Hide, rename, and reorder payment methods based on cart contents, customer, or address.
Migration Timeline Recommendation
Migrate your scripts in minutes, not months
ScriptShift analyzes your Ruby scripts and generates ready-to-deploy Function code. Free.
Try ScriptShift Free →