# Custom Styles for WooCommerce Emails

> Adds your own CSS to every WooCommerce email, for example to change fonts, button colours or table borders, without overriding email templates.

- Type: PHP
- Runs: Run everywhere
- Category: [WooCommerce](https://wpide.com/library/category/woocommerce/)
- Requires: WooCommerce
- Tags: woocommerce, email, styling, branding
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/woo-email-custom-styles/

## Code

```php
$wpide_email_css = '
#template_header h1 { font-weight: 600; letter-spacing: -0.5px; }
#body_content table td, #body_content table th { border-color: #e5e5e5 !important; }
#body_content a { color: #2563eb; }
.td { padding: 10px 12px !important; }
#template_footer #credit { font-size: 12px; color: #6b7280; }
';

add_filter( 'woocommerce_email_styles', function ( $css ) use ( $wpide_email_css ) {
    return $css . "\n" . wp_strip_all_tags( $wpide_email_css );
}, 20 );
```

## Notes

WooCommerce inlines this CSS into each email, so keep to simple selectors that email apps support.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Custom Styles for WooCommerce Emails" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
