Last active
September 14, 2022 11:24
-
-
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/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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