Hi Luke, thanks for the code. When I applied it, it didn’t work. I checked the code using ChatGPT and it said “the code is incorrect because of the way the CSS block is enclosed. The backticks (
) are not valid in PHP for defining strings unless you are using a feature like heredoc or nowdoc, which isn’t the case here.” When I used the suggested code it worked okay.
Are you able to check the revised code is safe to use?
Revised code:
add_filter( ‘woocommerce_email_styles’, function ( $css, $email ) {
$css .= ‘
table .xts-add-to-cart, .xts-add-to-cart {
color: #333;
}
‘;
return $css;
}, 11, 2 );
That hopefully fixes the styling for the add to cart button.
Finally, please can you help me fix the “confirm now” button which is in the first email. Same as the add to cart button, I need the text to be changed from white.