> For the complete documentation index, see [llms.txt](https://docs.yaycommerce.com/yaymail/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.yaycommerce.com/yaymail/drag-and-drop-email-builder/the-elements-of-design/using-a-hook-in-yaymail.md).

# Using a Hook in YayMail

### Using a Hook in YayMail <a href="#using-a-hook-in-yaymail" id="using-a-hook-in-yaymail"></a>

<figure><img src="https://docs.yaycommerce.com/yaymail/~gitbook/image?url=https%3A%2F%2F157604815-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MJfBhHG_1ipE5lMX4qT%252Fuploads%252FzXTxOKi18KIsPo6JBnB3%252Fimage.png%3Falt%3Dmedia%26token%3D9878f32b-39ea-46fb-bfd3-d92e9e02dd44&#x26;width=768&#x26;dpr=3&#x26;quality=100&#x26;sign=40cbbedc&#x26;sv=2" alt=""><figcaption></figcaption></figure>

To use one of the above hooks:

1. **Open** your email template (e.g., Processing Order, Completed Order).
2. **Add a WooCommerce Element** called **"Hook"** and click to edit it.
3. Under the **Hook** dropdown:
   * Select one of the available WooCommerce hooks: `woocommerce_email_before_order_table`, `woocommerce_email_after_order_table.`
4. Customize the padding, background, text color, and other styles.

<figure><img src="https://docs.yaycommerce.com/yaymail/~gitbook/image?url=https%3A%2F%2F157604815-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MJfBhHG_1ipE5lMX4qT%252Fuploads%252FtF7WoZia71tPXspMw4f4%252Fimage.png%3Falt%3Dmedia%26token%3D450494dc-d55c-48aa-84fb-588f67154ad4&#x26;width=768&#x26;dpr=3&#x26;quality=100&#x26;sign=fc644b72&#x26;sv=2" alt=""><figcaption></figcaption></figure>

Save changes!
