Skip to content

Instantly share code, notes, and snippets.

@danielbitzer
Last active September 14, 2022 11:24
Show Gist options
  • Save danielbitzer/4ef9df9c41b9d5465e9581e32a7b72f8 to your computer and use it in GitHub Desktop.
Save danielbitzer/4ef9df9c41b9d5465e9581e32a7b72f8 to your computer and use it in GitHub Desktop.
AutomateWoo - Adding email CSS with a filter. More info at https://automatewoo.com/docs/email/customizing-your-email-design/
<?php
add_filter( 'automatewoo/mailer/styles', 'my_automatewoo_custom_email_styles' );
/**
* @param string $css
* @return string
*/
function my_automatewoo_custom_email_styles( $css ) {
// add custom styles to $css string
$css .= "
.custom-button-1 {
display: inline-block;
font-size: 16px;
font-family: Helvetica, Arial, sans-serif;
color: #ffffff;
text-decoration: none;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
padding: 12px 18px;
border: 1px solid #db3236;
}
";
return $css;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment