For the complete documentation index, see llms.txt. This page is also available as Markdown.

Delivery Customization

Hide, rename or reorder the delivery options shown at checkout with JavaScript.

A delivery customization changes how delivery options are presented at checkout. Your code inspects the cart and returns a list of operations — hide an option, rename it, or move it to a different position.

var ops = [];

input.cart.deliveryGroups.forEach(function (group) {
  group.deliveryOptions.forEach(function (option) {
    if (option.title === 'Express') {
      ops.push({ deliveryOptionHide: { deliveryOptionHandle: option.handle } });
    }
  });
});

return { operations: ops };

The available delivery options are in input.cart.deliveryGroups[].deliveryOptions, each with a handle and title.

Operations

Return an array of operations, or { operations: [...] }. Each operation is an object with exactly one of these keys:

Operation
Shape
Effect

Hide

{ deliveryOptionHide: { deliveryOptionHandle: '...' } }

Removes the option from checkout

Rename

{ deliveryOptionRename: { deliveryOptionHandle: '...', title: '...' } }

Changes the displayed title

Move

{ deliveryOptionMove: { deliveryOptionHandle: '...', index: 0 } }

Moves the option to a position (0 = first)

Returning an empty array leaves the delivery options unchanged. Operations of any other shape are ignored.

Examples

Hide express shipping for heavy carts (use the General or Cart family):

Rename an option for VIP customers (use the Address + Customer or Shipping family with hasCustomerTags set to ["vip"]):

Notes

  • Delivery customizations don't use the Run on steps — they apply whenever delivery options are shown.

  • If your code throws, no operations are applied and checkout shows the options unchanged (fail open).

Last updated