⚠️   Shopify Scripts will no longer be supported as of June 30, 2026  ⚠️   read the Shopify article 

Navigating Shopify Functions Limitations for Plus Stores

Table of Contents

  1. Introduction
  2. The Technical Architecture of Shopify Functions
  3. Critical Shopify Functions Limitations: The 20KB Output Wall
  4. Understanding API-Specific Limits
  5. Shopify Plan Restrictions: Who Can Use Functions?
  6. The Shift from 5 to 25 Active Functions
  7. Scripts Migration: The Strategic Hurdle
  8. Choosing the Right Tool for the Job
  9. Advanced Use Case: The Cart Transform API
  10. Measuring the Impact of Your Functions
  11. Implementation Safety and QA
  12. Summary: A Checklist for Success
  13. Nextools Shopify App Suite (Quick Links)
  14. FAQ

Introduction

The transition from Shopify Scripts to Shopify Functions represents one of the most significant architectural shifts in the history of the Shopify platform. For Shopify Plus merchants, the August 2025 deadline for Script deprecation is no longer a distant date on a roadmap; it is a pressing technical requirement. While Functions offer superior performance and scalability compared to the Ruby-based Scripts of the past, they operate within a strict set of guardrails. Understanding shopify functions limitations is critical for any engineering team or high-growth merchant looking to maintain complex checkout logic without disrupting the buyer journey.

At Nextools, we specialize in helping merchants navigate this new landscape. Our mission is to provide the technical depth and specialized tools—like those found in our Shopify App Suite—that allow developers to implement advanced logic without the overhead of building and hosting custom applications. Whether you are migrating a decade’s worth of Scripts or building a new localized checkout experience from scratch, knowing where the platform’s boundaries lie is the first step toward a successful deployment.

This article is designed for Shopify Plus merchants, technical leads, and agency developers who need to understand the constraints of the WebAssembly (WASM) environment, the specific API thresholds, and the operational limits of Shopify Functions. We will apply the Nextools Playbook: clarify your goals, confirm platform limits, choose the simplest durable approach, implement safely in staging, and measure the impact on your conversion and operational efficiency.

The Technical Architecture of Shopify Functions

To understand the limitations of Shopify Functions, one must first understand what they are: code snippets compiled into WebAssembly (WASM) that Shopify executes on its own infrastructure. Unlike traditional apps that rely on external servers and webhooks, Functions run “serverless” within the Shopify environment. This ensures that even during massive flash sales, your checkout logic executes in milliseconds.

However, this execution model requires strict resource management. Unlike the older Ruby Scripts, which could occasionally time out or consume excessive memory if not optimized, Functions are governed by hard limits on execution time, memory usage, and payload size.

Execution Time and Performance

Every Shopify Function must execute in under 5 milliseconds. This is an incredibly tight window compared to traditional web development. If a function exceeds this limit, Shopify may fail the execution, potentially reverting the checkout to a default state or ignoring the intended customization.

This 5ms limit is why Shopify strongly recommends using Rust for function development. While JavaScript is supported via a Javy-based runtime, the overhead of the JavaScript engine can eat into that 5ms window, especially when dealing with large cart objects. At Nextools, we emphasize performance-first logic, ensuring that our tools like SupaEasy generate optimized code that stays well within these safety margins.

Memory Usage and WASM Size

The compiled WebAssembly module has a size limit, and the memory available during execution is also capped. This means your function logic cannot be an “all-in-one” solution that attempts to call multiple external APIs or perform heavy cryptographic calculations. Functions are intended to be “pure”—they take a GraphQL input, perform logic, and return a JSON output. They cannot make external network calls. If you need external data, it must be passed into the function via Metafields.

Critical Shopify Functions Limitations: The 20KB Output Wall

One of the most frequent “gotchas” for developers migrating from Scripts is the 20KB output limit. This refers to the size of the JSON document your function returns to Shopify to describe the operations it wants to perform (e.g., updating prices, hiding a shipping method, or applying a discount).

The Line Item Problem

For merchants with massive B2B orders or wholesale carts, the 20KB limit can be reached surprisingly quickly. If a buyer has 150 different line items in their cart and your function needs to apply a unique fixed price to each one, the resulting JSON output can easily exceed 20,480 bytes.

In a real-world scenario, a developer might attempt to return a price_adjustment for 200 items. Each object in the JSON array takes up space. If your function exceeds this limit, the entire operation fails. This requires a shift in thinking: instead of individual line-item updates for everything, developers must look for ways to group items or apply broader “order-level” logic where the API allows.

Strategies for Payload Optimization

To avoid the 20KB wall, merchants should:

  • Use Metafields wisely: Pass only the data you need. Don’t pull in massive blocks of JSON if you only need a single integer.
  • Modularize logic: Instead of one giant function, use multiple targeted functions. Shopify now supports up to 25 active functions per API target (like Payment Customization or Delivery Customization).
  • Minimize the output: Return only the necessary fields. If you aren’t changing the title or image of a line item in a CartTransform operation, don’t include those keys in your output.

Understanding API-Specific Limits

Shopify Functions are organized into specific APIs, each with its own purpose and set of constraints. When planning your transition from Scripts, you must identify which API covers your specific use case.

Delivery and Payment Customization APIs

These APIs allow you to hide, reorder, or rename shipping and payment methods.

  • Limitation: You cannot create new shipping rates or payment gateways that don’t exist; you can only manipulate the ones provided by the checkout.
  • Nextools Solution: For merchants needing to manage these without custom code, HidePay and HideShip leverage these APIs to provide a logic-based UI for hiding methods based on cart total, weight, or customer tags.

Cart and Checkout Validation API

This is essential for preventing fraud and ensuring order compliance. It allows you to block the “Place Order” button if certain conditions aren’t met.

  • Limitation: The validation runs at the end of the checkout process. While it provides a safe way to block orders, it can be frustrating for users if they only find out they can’t buy at the very last step.
  • Playbook Tip: Always pair backend validation with frontend UI hints (using Checkout UI Extensions) to inform the user of rules early in the journey. Our app Cart Block simplifies this by letting you set these rules without managing your own WASM modules.

Order Routing API

For Plus merchants with complex fulfillment networks, this API allows for proximity-based shipping and split-fulfillment prevention.

  • Limitation: It is currently focused on warehouse allocation and does not yet allow for the level of “custom courier selection” that some legacy carrier-service integrations provided.

Shopify Plan Restrictions: Who Can Use Functions?

A common misconception is that Shopify Functions are only for Shopify Plus. The reality is more nuanced:

  • Public Apps: Any merchant on any plan (Basic, Shopify, Advanced, Plus) can install public apps from the Shopify App Store that use Functions. This is a massive upgrade over Scripts, which were strictly Plus-only.
  • Custom Apps: Only Shopify Plus merchants can deploy custom apps containing Functions. If you want to write bespoke code that is private to your store, you must be on the Plus plan.
  • Development: Developers can test Functions in free Development Stores or Plus Sandbox stores.

At Nextools, we’ve designed our Shopify App Suite to be accessible. Apps like Multiscount bring the power of complex tiered discounting to merchants who might not be on the Plus plan yet but still need the performance of the Functions architecture.

The Shift from 5 to 25 Active Functions

Initially, Shopify limited stores to 5 active functions per API target. This was a significant bottleneck for merchants with complex “stackable” logic. Shopify recently increased this limit to 25 active functions.

This change is a double-edged sword. While it allows for better modularity (one function for VIP discounts, one for seasonal promos, one for B2B pricing), it increases the risk of logic collision.

Managing Conflict and Priority

If you have three different discount functions active, which one takes precedence? Shopify provides a “Function Priority” interface in the admin, but the developer must ensure that the functions are designed to be “aware” of each other. For example, a “Buy X Get Y” function might conflict with an “Order Subtotal” discount if they both try to modify the same line items.

When using our SupaEasy tool, we recommend a “one logic, one function” approach where possible, but for highly complex stores, we help merchants map out their 25 slots to ensure maximum coverage without performance degradation.

Scripts Migration: The Strategic Hurdle

The most pressing “limitation” of Shopify Functions today is actually a feature parity gap. While Functions can do 95% of what Scripts did, there are still edge cases where Scripts provided more flexibility because they were executed later in the server-side lifecycle.

What Functions Can’t (Yet) Easily Do

  1. Line Item Properties Editing: While CartTransform is closing the gap, changing specific custom properties on the fly within a discount function is more restricted than it was in Ruby.
  2. Complex External Data Fetching: Since Functions cannot perform network requests, you must sync external data (like loyalty points or external CRM tiers) into Shopify Metafields before the customer hits the checkout. This requires a robust middleware or an automation tool like Hook2Flow to keep data in sync.

The Nextools Migration Workflow

We recommend a phased approach for any store moving away from Scripts:

  1. Audit: List every Script currently running (Shipping, Payment, Discount).
  2. Map: Match each Script to its corresponding Function API (e.g., a Shipping Script becomes a Delivery Customization Function).
  3. Prototype: Use SupaEasy to recreate the logic. SupaEasy includes a Script Migrator and an AI assistant designed to translate Ruby logic into the WASM-ready Function structure.
  4. Test: Deploy to a staging/sandbox environment. Use “Preview” modes to ensure the logic triggers correctly for different customer segments.
  5. Cutover: Disable the Script and enable the Function simultaneously during a low-traffic period.

Choosing the Right Tool for the Job

Not every checkout customization requires a custom-coded Function. In fact, following the Nextools Playbook, we suggest choosing the “simplest durable approach.” Often, a pre-built app that leverages Functions is more stable and cost-effective than a custom build.

Use a Nextools App When:

  • You need standard logic (hiding payments, tiered discounts, minimum order values).
  • You want a non-technical team to manage the rules via the Shopify Admin.
  • You want to avoid the maintenance cost of hosting a custom app and managing WASM updates.

Build a Custom Function When:

  • You have a truly unique business model (e.g., highly specific inventory-based pricing that no app supports).
  • You are a Plus merchant with a dedicated DevOps team.
  • You need to integrate with a proprietary internal API (via Metafield syncing).

For a complete overview of how our tools fit into your stack, visit the Nextools Shopify App Suite hub.

Advanced Use Case: The Cart Transform API

One of the most powerful—and most complex—parts of the Functions ecosystem is the Cart Transform API. This is where “bundles” live. In the past, bundles were often a nightmare of “hidden” products and theme hacks. With Functions, you can combine products into a single line item at checkout and then expand them back into individual components for fulfillment.

Cart Transform Limitations

  • State Management: Keeping the price in sync when quantities change requires careful logic.
  • UI Synchronization: The checkout UI must reflect what the Function is doing. If a Function creates a bundle, the user needs to see that clearly. This is where SupaElements comes in, allowing you to add dynamic UI elements to the checkout that explain the logic occurring in the background.

Measuring the Impact of Your Functions

The final step in the Nextools Playbook is measurement. Because Functions are high-performance, they shouldn’t negatively impact conversion rates. However, logic errors (like a validation rule being too aggressive) can hurt your bottom line.

Checklist for Post-Deployment Monitoring:

  • Checkout Completion Rate: Did it drop after the new Function went live?
  • Average Order Value (AOV): Are tiered discount functions actually encouraging larger carts?
  • Support Tickets: Are customers complaining about “available” payment methods being hidden?
  • Execution Logs: Use the Shopify Admin to check for function failures or timeouts.

By monitoring these metrics, you can iterate on your logic. Perhaps that 5ms execution window is being pushed too hard, or perhaps a conflict between two of your 25 active functions is causing unexpected pricing errors.

Implementation Safety and QA

Never deploy a Shopify Function directly to a live Plus store without testing. The WASM environment is less forgiving than liquid or theme code.

  1. Use GitHub Integration: Shopify allows you to deploy functions via CLI. Keep your code in version control.
  2. Mock Inputs: Use the shopify app function run command to test your logic against various JSON payloads locally.
  3. Visual QA: Use the “Checkout Preview” feature to see how the function affects the actual checkout UI.
  4. Rollback Plan: Know exactly how to disable a function in the Shopify Admin if something goes wrong.

Summary: A Checklist for Success

To successfully navigate shopify functions limitations, follow this engineering-minded workflow:

  • Identify Constraints: Are you on Shopify Plus? Are you hitting the 20KB output limit?
  • Select the API: Does your use case fit into Payment, Delivery, Discount, or Validation?
  • Minimize Logic: Can the function be simpler? Are you using Rust for maximum performance?
  • Avoid Collision: If you have multiple active functions, check their priority and potential interactions.
  • Sync Data Early: Ensure all necessary external data is available in Metafields before the function runs.
  • Use Proven Tools: Leverage the Nextools App Suite to handle common use cases with optimized, platform-compliant code.

Shopify Functions are the future of commerce logic. By embracing their limitations as structural guidelines rather than obstacles, you can build a checkout experience that is both highly customized and incredibly fast.

Nextools Shopify App Suite (Quick Links)

FAQ

Is Shopify Plus required to use Shopify Functions?

No, any merchant can use public apps that utilize Functions. However, creating and deploying your own custom apps with Functions is a feature exclusive to Shopify Plus. If you are not on Plus, you should look for established apps in the Shopify App Suite to fulfill your customization needs.

How do I test Shopify Functions safely before the Script deprecation?

You should create a Shopify Plus Sandbox or a Development Store. Use the Shopify CLI to deploy your functions there first. This allows you to run QA scenarios, such as testing large carts to see if you hit the 20KB output limit or the 5ms execution window, without affecting your live store’s revenue.

Can a Shopify Function perform an external API call?

No. Shopify Functions are executed in a restricted WebAssembly sandbox that does not have network access. All external data required for the function’s logic must be stored in Shopify Metafields (on the product, customer, or order) and passed as part of the GraphQL input query.

What happens if I have more than 25 active functions?

Shopify currently limits you to 25 active functions per API target. If you reach this limit, you will need to consolidate your logic. At Nextools, we recommend using modular code within a single function for related tasks (like all your “Shipping Hiding” rules) to stay well under this limit while maintaining clean organization.

SupaEasy is a product built & designed by Nextools

Company

© [2024] website by Nextools. All Rights Reserved. PIVA: 16711981007