This topic has 2 replies, 2 voices, and was last updated 2 months, 4 weeks ago ago by Jack Richardson
Hello,
I want to change the font in xstore’s email builder emails. The current one is just not good.
I looked at the solution here:
https://www.8theme.com/topic/files-of-xstore-built-in-email-builder/
But after applying the code nothing changes. I wanted to insert a “Inter” font (with your code):
add_filter('woocommerce_email_styles', 'add_css_to_email', 99999999);
function add_css_to_email($css) {
$css .= '
/* Put CSS here */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap");
body, div, h2, h3, h4, td, tr, span {
font-family: "Inter", sans-serif;
}';
return $css;
}
Also your original code didn’t work. Am i doing something wrong?
Thank you,
Dear @TheOne,
I hope this message finds you well. I would like to inform you that the filter has not been altered, so the code should function correctly in your scenario. However, if you are experiencing issues, I would like to suggest a few potential solutions:
1. Please consider disabling any third-party plugins that might be overriding this filter.
2. You might try using a different Google Font to see if that resolves the issue.
3. Attempt to add the !important
postfix to your CSS properties, which might help in enforcing them.
4. If you are using our Email builder for emails, please, test on real emails as if you are currently making tests with test mails sent manually from our Email builder it could not work as expected.
5. Test with Storefront theme but add this code to the some plugins that allows making own snippets such as WP Code.
6. Lastly, check the functionality across different email services, especially if you are using a less popular one, as it might not support the @import
functionality of basic CSS for emails.
Thank you for your attention to these suggestions. Should you need further assistance, please do not hesitate to contact us.
Best Regards,
Jack Richardson
The 8Theme Team
You must be logged in to reply to this topic.Log in/Sign up