Checkout UI Extension – applyCartLinesChange(addCartLine) not supported on client Plus store

2h

Hi everyone,

I’m facing an issue with a Checkout UI Extension on a Shopify Plus store.

I’m using applyCartLinesChange to add a variant in checkout:

const result = await applyCartLinesChange({
  type: 'addCartLine',
  merchandiseId: 'gid://shopify/ProductVariant/43758998552673',
  quantity: 1,
});

On my dev/test Plus store, this works correctly.

But on the client’s Plus store, it fails and I see this console error:

ExtensionUsageError: applyCartLinesChange with type addCartLine is not supported on this checkout. Consider checking "instructions.lines" first.

When I log instructions, I see that:

instructions.value.lines.canAddCartLine

is always false until later in checkout. The item only gets added after the customer enters the shipping address.

This functionality is essential for the client’s checkout experience, as we need to dynamically add an extra line item based on custom logic. Since the client has upgraded to Shopify Plus, we expected this to be supported, but the current limitation is blocking the implementation. I’d really appreciate any guidance on what could be causing this and how we can resolve it, as it directly impacts the project delivery.

Hi @Sam_Tim

Cartline changes are not permitted when the checkout is a draft order. I believe this might be the case you are running into. On regular checkouts, this should work just fine.

Regards,
James

Hi @James_Vidler,

Thanks for your response, really appreciate it.

I’ve managed to identify and resolve the issue. It turned out that a third-party app installed on the store was using the same functionality, which was overriding my implementation. After addressing that conflict, everything is now working as expected.

Thanks again for your help!

Best regards,
Sam