---
title: "Breaking: #452 - Replace Hooks"
manual: "Cart"
version: "12.1"
permalink: "https://docs.typo3.org/permalink/extcode/cart:breaking-452-replace-hooks@12.1"
source: "Changelog/9.0/Breaking-452-ReplaceHooks.rst"
rendered: "2026-11-14T23:50:30+00:00"
---

# Breaking: #452 - Replace Hooks {#breaking-452-replace-hooks}

See [Issue 452](https://github.com/extcode/cart/issues/452)

## Description {#description}

Existing Hooks have been removed. They were replaced by EventListeners.
The extension offered following hooks:

-   `showCartActionAfterCartWasLoaded` in `ExtcodeCartControllerCartCartController`
-   `AddToCartFinisher` in `ExtcodeCartDomainFinisherFormAddToCartFinisher`
-   `MailAttachmentHook` in `ExtcodeCartServiceMailHandler`

## Affected Installations {#affected-installations}

All installations that used the hooks to programmatically adjust the behavior
of the extension are affected.

## Migration {#migration}

-   `showCartActionAfterCartWasLoaded` in `ExtcodeCartControllerCartCartController`
    now needs to listen to the event `ExtcodeCartEventCartBeforeShowCartEvent`
-   `AddToCartFinisher` in `ExtcodeCartDomainFinisherFormAddToCartFinisher`
    now needs to listen to the event `ExtcodeCartEventFormAddToCartFinisherEvent`
-   `MailAttachmentHook` in `ExtcodeCartServiceMailHandler`
    now needs to listen to the event `ExtcodeCartEventMailAttachmentEvent`
