Custom CSS / Styling

Forums Custom Emails for WooCommerce Custom CSS / Styling

Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #128395
    Moshtafizur
    Participant

    Hi there,

    I am really sorry to know you are experiencing problems.

    I have escalated this with our development team. They will get back to you as soon as they can.

    Kind regards,
    Moshtafziur

    #131217
    Tom Anbinder
    Moderator
    Plugin Support

    Hi, Thore,

    Sorry for not getting back to you sooner.

    How can I override those colors?

    Since the plugin v2.7.1, you can set additional styling with the new “Email style” options (in “WooCommerce > Settings > Emails > Custom email #X > Email Data”).

    Or can I use a filter / hook to add custom styling to my email?

    Yes, you can use the alg_wc_custom_emails_content filter:

    add_filter( 'alg_wc_custom_emails_content', function ( $content, $email, $order, $user, $product ) {
        if ( 1 == $email->alg_wc_ce_id ) { // for the "Custom email #1"
            $content = '<style> .my-class { color: orange; } </style>' . $content;
        }
        return $content;
    }, 10, 5 );

    Please give it a try and let me know what you think.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.