Skip to main content

Checkout Overrides

Overrides enable developers to bypass standard Bold functionality in favor of custom functionality or rules. For example, a developer may want to use custom tax rules instead of Bold Checkout's built-in tax functionality.

Types of overrides

Bold enables the following types of overrides:

  • address_validate
  • discount
  • inventory
  • shipping
  • tax

API overrides vs plugin overrides

You can create an override in one of two ways: via API or via plugin. There are several key ways in which these processes differ:

API overridesPlugin overrides
Used in integrations.Used in plugins.
Applied at the store level. Each order placed on that store uses the override functionality.Applied at the order level, which enables the plugin to apply the override to just a portion of the orders on a store.
Always applied immediately after the order is initialized (before any plugin overrides).Applied after API overrides.
note

Because Bold always uses the last override applied, if both an API override and plugin override of the same type (i.e., two tax overrides) are applied on an order, only the plugin override is used.

Override triggers

Each override is triggered by certain API calls that occur during the Checkout process. The following table shows the API calls that trigger each override:

OverrideTriggering API type
address_validateSet Shipping Address, Update Shipping Address, Set Billing Address, Update Billing Address, and Validate Address
discountValidate Discount Code, Add Discount Code, and Process Order
inventoryCheck Inventory and Process Order
shippingList Shipping Lines and Set Shipping Line
taxGenerate Taxes
note

Plugin overrides use a prefix of override_. For example, a tax override has a plugin action called override_tax.