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. Which WooCommerce hook do I need to use to place the coupon field after the checkout sidebar
  78. Categories not shown in admin after adding woocommerce products via wp wc cli
  79. Enabling autosave when plugin disabled
  80. Woocommerce PHP site that shows table with orders from specific category
  81. How to get the webshop page in 2:nd language, with Polylang and Hyyan
  82. Subcategories not working when using shared base with custom taxonomy
  83. Woocommerce Shortcode custom orderby not working
  84. What’s the fastest way to import products with variations in WooCommerce (CSV, XML, …) [closed]
  85. WOOCOOMERCE: Run function before payment gateway (paying)
  86. Benefits over using object method over property from $product?
  87. How to change product category permalinks programmatically?
  88. Make e-Mail optional on Woocommerce sign up
  89. Create order actions from custom fields woocommerce
  90. Woocommerce language isn’t default language
  91. How set variation after filter in WooCommerce?
  92. Does anyone know a crowdsourcing plugin that can support the following use case?
  93. WordPress user ID prefix
  94. WooCommerce – different icons for product categories
  95. WordPress returning “XHR” even when access keys are used
  96. mydomain.com/wp-login redirects to wordpress.com/wp-login
  97. Is it possible to hide certain products from displaying in the search results
  98. Send Processing Order Email from custom payment plugin
  99. WordPress Woocommerce product-category info on one line [closed]
  100. Woocommerce display price without formatting [closed]
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
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • Get the name of the template/*html file used
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
  • How to display the description of a custom post type in the dashboard?
  • Critical error on image display
  • Copying WP data and files into new install?
  • How to determine the DirectAdmin WordPress backup date?
  • How to get list of ALL tables in the database?
© 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