Web Development & WordPress

Change woocommerce mail template’s footer background ,text color and font size

So i wanted to change the woocommerce mail template’s footer background color, font size and font family ( screen shot below). I have shared the code too which i used

Here is the code i used:

/**
 * Add custom CSS to WooCommerce email templates
 */
function my_custom_email_styling($css) {
    // Custom CSS for footer
    $custom_css = "
    table#template_footer * {
        color: black !important;
        font-size: 16px !important;
        font-weight: bold;
    }
    div#template_header_image p {
    margin-bottom: 0px;
    padding: 0 !important;
}
    table#template_footer {
        background: #e9b868 !important;
        border: none !important;
        margin-top: -1px !important;
        color: black !important;
    }";
    
    // Append the custom CSS to the existing styles
    $css .= $custom_css;
    
    return $css;
}
add_filter('woocommerce_email_styles', 'my_custom_email_styling');

Leave a comment