Skip to content

Conversation

DanielHudson2
Copy link
Member

@DanielHudson2 DanielHudson2 commented Aug 4, 2025

  • Checks if an email sent to "wp_mail" has a content-type header for setting it to be HTML, if it already does it skips it (to handle already configured emails like woocommerce)
  • If it doesn't already have html then it sets it, then wraps the content within a custom email template to give better formatting
  • Specific scenario added for gravity forms, hooking into pre send email hook to wrap the content in the same custom email template
  • filter orbit_branded_emails_disable can be used to completely disable this feature
  • filter orbit_branded_emails_header_logo can be used to set a logo in the email header, if this isn't set then it falls back to a h1 containing the site name
  • multiple filters in email-styles.php for controlling colours in email e.g. orbit_branded_emails_background_color
  • Added template functions to include the templates which allows overriding within the theme for sites with more specific needs, added in their own class so that they can be reused in the future if needed for other features

@DanielHudson2 DanielHudson2 self-assigned this Aug 4, 2025
@DanielHudson2 DanielHudson2 added the enhancement New feature or request label Aug 4, 2025
Copy link
Member

@brettsmason brettsmason left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will add more comments tomorrow, but looking good so far. Just a few suggested changes.

@brettsmason
Copy link
Member

brettsmason commented Aug 7, 2025

@DanielHudson2 Looking great thanks!

A few points (only minor):

  • The theme.json values are showing as variables, rather than the root hex code for me
  • It would be nice to use WooCommerce colour values if available
  • Replace Gravity Forms inline table colours with our own (maybe use the tint colour)
  • There is a margin-left: 24px on the logo if one is set, which puts it out of alignment

The styling requirements might get more complicated, so perhaps we move styling to a class method and simply call the method in the email-styles.php file (probably return an array of the colour keys and values)?

@brettsmason
Copy link
Member

We are looking good now, thanks @DanielHudson2 🎉

@brettsmason brettsmason merged commit 83a6e97 into main Aug 11, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants