douli2063 2019-04-24 19:01
浏览 98

如何将outlook条件css添加到woocommerce订单电子邮件模板定制?

I'm trying to customize, woocommerce order confirmation email. I'm trying to add padding "if it's mso " to my logo_wrapper that contains a logo like this

add_filter( 'woocommerce_email_styles', 'ga_woocommerce_email_styles' );
function ga_woocommerce_email_styles( $css ) {
    $css .="<!--[if (gte mso 9)|(IE)]>
    <style>  #logo_wrapper{padding:10px !important;}</style>
    <![endif]-->";
    return $css;
}

it doesn't work as expected,if i try this $css .= " #logo_wrapper{padding:10px !important;}"; it works.But, I want the padding to work only for outlook client. I'm having trouble with the mso conditional.I also tried removing the tag inside $css. Any suggestions on what's going wrong?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 Stata 面板数据模型选择
    • ¥20 idea运行测试代码报错问题
    • ¥15 网络监控:网络故障告警通知
    • ¥15 django项目运行报编码错误
    • ¥15 请问这个是什么意思?
    • ¥15 STM32驱动继电器
    • ¥15 Windows server update services
    • ¥15 关于#c语言#的问题:我现在在做一个墨水屏设计,2.9英寸的小屏怎么换4.2英寸大屏
    • ¥15 模糊pid与pid仿真结果几乎一样
    • ¥15 java的GUI的运用