Theming Exchange - Hooking into Exchange Templates

Each Exchange template contains a set of action hooks for theme and add-on developers to use. The best way to find the names of these hooks is looking within a template file, but this page will try to explain the basic concept of these action hooks and how to use them.

When creating an add-on for Exchange, one thing a developer needs is a way to add the add-ons items to the different pages of Exchange. The best way to do this is with action hooks.

do_action( 'action_tag_name' );

Example

Let's say you wanted to add a notification (perhaps about an upcoming sale) to the cart, just above the cart items, but did not want to copy over the entire cart items template (templates/content-cart/elements/items.php). This could be accomplished using the follow hook: