Type: Fix / Decision Guide · Stage: Optimize / Scale · Topic: Shopify Functions / Bundles / Subscriptions
On this page
Quick answer
Shopify Cart Transform Functions cannot transform cart lines that carry selling plans. The current API rejects lineExpand, linesMerge, and lineUpdate operations when a selling plan is present. Shopify’s bundle documentation also says bundles cannot be sold with subscriptions, pre-orders, or try-before-you-buy selling plans. If a mix-and-match bundle works as a one-time purchase but fails with Subscribe & Save, check the selling plan before debugging your Function’s deployment.
Why the usual bundle tutorial breaks
A standard customized-bundle tutorial shows multiple component variants becoming one grouped line, or one parent line expanding into components. That works in supported one-time scenarios. A subscription introduces recurring purchase terms through a selling plan. A line-item property saying “subscription bundle” does not create a supported recurring bundle contract, and hiding the plan from the cart is not a safe workaround.
Old tutorials sometimes treat bundle grouping as purely visual. Shopify’s checkout, inventory, fulfillment, and subscription billing all need a consistent representation of the purchase. A successful theme display is not evidence that recurring checkout will accept the operation.
Inspect the Function input
Query sellingPlanAllocation on cart lines and check it before constructing operations. The current Cart Transform schema exposes the allocation and associated selling plan. This query illustrates the relevant fields; adapt it to your extension’s generated input schema and API version.
query CartTransformRunInput {
cart {
lines {
id
quantity
sellingPlanAllocation {
sellingPlan { id name }
}
merchandise {
... on ProductVariant { id }
}
}
}
}
A decision guard can prevent your Function from returning an invalid operation, but it does not make a subscription bundle possible:
// Decision-only example, not a complete Function
const oneTimeLines = input.cart.lines.filter(
line => !line.sellingPlanAllocation
);
// Build and validate operations only for eligible one-time lines.
// Keep subscription lines and their selling plans intact.
Do not trust browser-supplied line-item properties as proof of pricing or eligibility. Validate bundle definitions and component variants against trusted data before creating any operation.
Pick a compatible merchandising model
| Requirement | Recommended direction |
|---|---|
| One-time fixed bundle | Use Shopify’s fixed-bundle model when it fits the merchandise and inventory requirements. |
| One-time mix-and-match bundle | Use a supported customized bundle with Cart Transform and a validated component selector. |
| Recurring individual components | Keep the components as separate subscription lines with legitimate selling plans; storefront grouping alone does not create a bundle. |
| One recurring subscription box | Model the subscription offer through a supported product and selling-plan setup; have the subscription provider manage recurring contracts and fulfillment. |
| Both one-time and recurring offers | Separate the purchase paths and test each independently instead of reusing one transform for both. |
Two other limitations worth checking
Store plan: Shopify documents that lineUpdate operations are available only on development stores and Shopify Plus stores. Do not assume a successful development-store price override will run on a non-Plus production store.
Multiple Functions: More than one app may run Cart Transform operations. Shopify applies precedence when operations target the same cart line; an expand can take priority over a merge or update. Test the complete installed app stack.
Common misunderstanding
“The subscription app broke my bundle.” A rejected transform on a selling-plan line is a documented Shopify restriction, not necessarily an app malfunction.
“I can switch from linesMerge to lineUpdate.” Selling-plan lines are restricted for line updates too, and line updates have an additional plan requirement.
“A line-item property makes a recurring bundle.” Properties can label a purchase but cannot replace a valid selling plan, bundle definition, or recurring billing contract.
How to test this
- Create a one-time cart with eligible component variants and verify merge or expand behavior through checkout.
- Add the same merchandise with a real selling plan. Inspect the Function input and confirm the incompatible operation is not emitted.
- Test a mixed cart with one-time and subscription lines. Verify that one-time transforms do not target recurring lines.
- Confirm first-order and recurring prices, selling-plan IDs, subsequent billing terms, and the subscription portal for the supported recurring path.
- Test on the target production plan; do not extrapolate
lineUpdateavailability from a development store. - Enable other cart-transforming apps and check for operation conflicts.
- Inspect component inventory, fulfillment records, refunds, and cancellation handling before launching the offer.
Sources and further reading
- Shopify Dev: Cart Transform Function API and selling-plan restrictions
- Shopify Dev: product bundles and limitations
- Shopify Dev: fixed and customized bundles
- Shopify Dev: customized bundle Function
- Shopify Dev: products, purchase options, and selling plans
Documentation checked October 19, 2026.

