> 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/basic-elements/using-a-hook-in-yaymail.md).

# Using a Hook in YayMail

### Using a Hook in YayMail

<figure><img src="https://157604815-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJfBhHG_1ipE5lMX4qT%2Fuploads%2FzXTxOKi18KIsPo6JBnB3%2Fimage.png?alt=media&amp;token=9878f32b-39ea-46fb-bfd3-d92e9e02dd44" 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://157604815-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJfBhHG_1ipE5lMX4qT%2Fuploads%2FtF7WoZia71tPXspMw4f4%2Fimage.png?alt=media&amp;token=450494dc-d55c-48aa-84fb-588f67154ad4" alt=""><figcaption></figcaption></figure>

Save changes!
