Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

How to add (and change the font of) the short product description to order page and customer’s new order e-mail [closed]

I don’t know what the font is for the rest of the email but if you can discern that by examining one of the emails sent you’ll want to copy the style rule to this element:

return $item_name . '<br><p class="item-description">' . $excerpt ; '</p>';

As this is an email you’ll have to rely on fonts available to the user, so check the email and locate what fonts are being assigned and then add them like this:

return $item_name . '<br><p class="item-description" style="font-family:WHATEVERTHEFONTIS,Arial,Helvetica,sans-serif;font-size:XXpx;font-weight:XXpx;">' . $excerpt ; '</p>';

In earnest though, you’d be better off overriding the email templates using standard WooCommerce (I’m assuming this is for WooCommerce.) template overrides in your theme/child theme.

https://docs.woocommerce.com/document/template-structure/

That will give you full control over the templates and rather than inline styling will allow you to update the actual <style> at the start of the email.

Related Posts:

  1. WooCommerce: The model of e-mail is displaying only the html, not css [closed]
  2. Turkish Character Problem on mailing
  3. How do you access the Product Short Description in a WooCommerce email template? [closed]
  4. single-product.php template not working for single products [closed]
  5. How do I add a text input field for customers to leave a note on a single WooCommerce product page?
  6. WooCommerce lost password reset flow not working with SendGrid (redirect loop)
  7. The correct way to override WooCommerce product gallery from a plugin [closed]
  8. Preventing WooCommerce email sending only on particular conditions
  9. woocommerce fail to replace template string in email title [closed]
  10. How can I show an empty WooCommerce cart? [closed]
  11. Woocommerce HTML email option unavailable
  12. WooCommerce: display text instead of raw checkbox value email
  13. Editing Header Titles of each details in woocommerce Order Email [closed]
  14. Woocommerce : How to attach an custom attachment with customer-processing-order.php email template [closed]
  15. WooCommerce email text based on category && shipping zone && payment method [closed]
  16. WooCommerce: Email Notifications
  17. Woocommerce email template customization [closed]
  18. Woocommerce template single-product.php in theme folder not working
  19. Disable Woocommerce product tags display by alphabetical order
  20. woocommerce_email_attachments filter arguments [closed]
  21. WordPress ‘on behalf of’ email
  22. How do I hide the purchase note in the WooCommerce ‘order completed’ email?
  23. Add custom order meta to Order Completed email
  24. Woocommerce: Prevent sending of email when order is “Completed”
  25. WooCommerce template page for category
  26. show content of a page built using yootheme builder on different page/template
  27. How to add a user custom field into Woocommerce emails?
  28. Woocommerce specific product template for product type
  29. Custom Admin Email Subject for Woocommerce (3.8.0) Orders
  30. WooCommerce order complete email logic
  31. woocommerce email template detect email recipient
  32. Adding extra email address who receives email like admin – woocommerce
  33. Woocommerce – Add HTML around Product description [closed]
  34. Add shipping address to Woocommerce order emails [closed]
  35. Woocommerce Email show HTML source code [closed]
  36. Send email notifications to a defined email address depending if a product in order has a specific TAG [closed]
  37. Woocommerce – Change the template?
  38. Woocommerce emails from gmail not being sent
  39. Different Templates for Woocommerce Parent and Child Sub Categories
  40. Send admin new order email to logged in user as well
  41. Create new email in WooCommerce
  42. Custom template – query issues
  43. How can i get the code of Shop Page Woocommerce?
  44. How to check if woocommerce_order_item_name is use in email?
  45. WordPress woocommerce new order email not working
  46. Custom Email via Hook only for completed order
  47. Access custom meta_data in processing order email
  48. Loading different header and footer in woocommerce templates (AMP)
  49. Custom WooCommerce template for product
  50. How to send Woocommerce Customer Details (Name, Email and Phone Number) to Admin upon signup
  51. How to change lost password email text using custom plugin wordpress?
  52. Using admin email in billing address
  53. Woocommerce – wc_cart_totals_shipping_method_label() breaking out option tag
  54. Forgot password flow does not work, getting email with a link but after clicking link it’s not working
  55. Editing fields required in the WooCommerce / WordPress registration form [closed]
  56. Send a different “thank you” email based on payment method
  57. Display product thumbnail in Woocommerce email notifications
  58. Customer Email Address
  59. Customize categroy catalog page
  60. Add to cart is not visible in product page
  61. Disable theme WooCommerce template [closed]
  62. Adding time of order to Admin email for new order
  63. (WooCommerce) Conflict with template – Can’t load payment methods
  64. how to add custom reviews button in woocommerce order complete generated mail
  65. How to add coupon expiry date into the followup emails?
  66. Conditional email recipient based off Shipping Method [closed]
  67. MailPress plugin: table inline style tag removed when sending the newsletter
  68. Manual Woocommerce Complete order Emails
  69. Output fields manually in Woocommerce email templates
  70. How to override email text New Customer Order?
  71. Woo-Commerce new order email no style attached
  72. WooCommerce – How to add a custom field to only a specific email template [closed]
  73. Insert a custom field as a second email address to a completed order in WooCommerce
  74. editing product page template – getting template for related products not working
  75. Woocommerce template not working on newly added products
  76. Woocommerce admin order email customize – remove product short description
  77. How to implement my product variations/attributes in my contact form 7 email?
  78. Categories and products in cart Woocommerce
  79. Update products with curl (bash)
  80. Woocommerce: Unique price for individual basket items
  81. Hide add to cart when product variation has no price or is unavailable
  82. Admin – Custom Post Type in WooCommerce menu – how to control menu order
  83. Facing issue in Woocommerce 3.3 version in wordpress
  84. SyntaxError: unterminated string literal – if WordPress Debug in wp-config is set to true
  85. getting attributes in a product loop
  86. How Fragile Is DB if I Upload Completely Updated Files
  87. Broken 302 redirection for product subcategory (Woocommerce, Apache)
  88. Send default WooCommerce email when switching from custom order status
  89. Can I get some product is virtual in Woocommerce by hook?
  90. Woocommerce order_complete email dont send after changing order status via sql
  91. Removing storefront-sorting div from the before section of Shop page
  92. Site with WooCommerce section moved to HTTPS – all pages except home and main store are 404s
  93. syntax error – woocommerce
  94. Multiple quantities with options
  95. How to on/off woocommerce filter with redux framework [closed]
  96. Hook woocommerce price in backend order edition
  97. Template conflict with WC Payment Method
  98. Website Tablet Check Out Field Issue
  99. How to change the link of product menu from wordpress admin panel
  100. WooCommerce order created via REST – sending the date_created along
Categories woocommerce-offtopic Tags email, html-email, templates, woocommerce-offtopic
can I extend the WP_Query class to deal with ‘duplicate’ posts created by joining to wp_posts?
Help to create function that changes name in the certificate of the sensei lms

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Post Navigation Elementor
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • WPFacet multiple loop displaying duplicate content
  • Get the name of the template/*html file used
  • Fix: WordPress.DB.PreparedSQL.NotPrepared Plugin Check (PCP)
  • Removing unnecessary CSS and JS code from wp_head()
  • hexagonal image gallery. Am I on the right track? [closed]
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
© 2026 Read For Learn
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress