What are the differences between a block and a function?

Estimated reading: 2 minutes 96 views

Blocks and functions are two distinct types of checkout customizations offered by Checkout Craft, each serving different purposes.

Block

  • Blocks utilize one or more of Shopify’s checkout UI extension components to present a widget or “block” of UI within the checkout & thank you page.
  • To implement blocks, they must be added to the checkout using Shopify’s checkout editor.

Function

  • Functions, depending on their type, modify the checkout without the need for the checkout editor.
  • These modifications are activated upon creation and can be disabled upon deletion/deactivate button.

In summary, blocks leverage Shopify’s UI extension components to embed custom UI elements within specific pages of the checkout process, while functions directly modify the checkout behavior without requiring the checkout editor for implementation.

Leave a Comment

Share this Doc

What are the differences between a block and a function?

Or copy link

CONTENTS