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:
API overrides vs plugin 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.
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.
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:
|Triggering API type
|Set Shipping Address, Update Shipping Address, Set Billing Address, Update Billing Address, and Validate Address
|Validate Discount Code, Add Discount Code, and Process Order
|Check Inventory and Process Order
|List Shipping Lines and Set Shipping Line
Plugin overrides use a prefix of
override_. For example, a tax override has a plugin action called