Skip to content

Add new invite email template#12130

Merged
tofumatt merged 9 commits into
developfrom
enhancement/11851-add-invitation-email-template
Feb 11, 2026
Merged

Add new invite email template#12130
tofumatt merged 9 commits into
developfrom
enhancement/11851-add-invitation-email-template

Conversation

@benbowler

@benbowler benbowler commented Feb 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

Addresses issue:

Relevant technical choices

As part of this ticket, I'd worked on some initial optimisation to allow for future simple email templates that follow the same design as this one (three will be added to this feature in this epic). I've created shared simple template methods throughout the render process and also included copy to be used in the plain text renderer in a centralised class Body_Content_MapTest.

This can be extended upon in upcoming tickets, we should consider sharing the template between each similar email with only configurable body copy within a centralised class.

PR Author Checklist

  • My code is tested and passes existing unit tests.
  • My code has an appropriate set of unit tests which all pass.
  • My code is backward-compatible with WordPress 5.2 and PHP 7.4.
  • My code follows the WordPress coding standards.
  • My code has proper inline documentation.
  • I have added a QA Brief on the issue linked above.
  • I have signed the Contributor License Agreement (see https://cla.developers.google.com/).

Do not alter or remove anything below. The following sections will be managed by moderators only.

Code Reviewer Checklist

  • Run the code.
  • Ensure the acceptance criteria are satisfied.
  • Reassess the implementation with the IB.
  • Ensure no unrelated changes are included.
  • Ensure CI checks pass.
  • Check Storybook where applicable.
  • Ensure there is a QA Brief.
  • Ensure there are no unexpected significant changes to file sizes.

Merge Reviewer Checklist

  • Ensure the PR has the correct target branch.
  • Double-check that the PR is okay to be merged.
  • Ensure the corresponding issue has a ZenHub release assigned.
  • Add a changelog message to the issue.

@github-actions

github-actions Bot commented Feb 2, 2026

Copy link
Copy Markdown

Storybook is ready:

@github-actions

github-actions Bot commented Feb 2, 2026

Copy link
Copy Markdown

Build files for 9676996 have been deleted.

@benbowler benbowler force-pushed the enhancement/11851-add-invitation-email-template branch from 83d24dc to 22c6c2e Compare February 2, 2026 10:43
@benbowler benbowler changed the title Update tester plugin to add new templates. Add new invite email template Feb 2, 2026

@tofumatt tofumatt left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

One question about the asset strings here, and a few text comments/suggestions, but otherwise this looks good 👍🏻

Comment thread includes/Core/Email_Reporting/Body_Content_Map.php Outdated
Comment thread includes/Core/Email_Reporting/Body_Content_Map.php Outdated
Comment on lines +30 to +54
/**
* Asset paths mapping.
*
* Maps asset filenames to their versioned folder paths.
* Format: 'asset-filename.png' => 'version/template-name'
*
* @since n.e.x.t
* @var array
*/
const EMAIL_ASSET_PATHS = array(
// email-report assets (1.168.0).
'site-kit-logo.png' => '1.168.0/email-report',
'shooting-stars-graphic.png' => '1.168.0/email-report',
'icon-conversions.png' => '1.168.0/email-report',
'icon-growth.png' => '1.168.0/email-report',
'icon-link-arrow.png' => '1.168.0/email-report',
'icon-search.png' => '1.168.0/email-report',
'icon-views.png' => '1.168.0/email-report',
'icon-visitors.png' => '1.168.0/email-report',
'conversions-timeline-green.png' => '1.168.0/email-report',
'conversions-timeline-red.png' => '1.168.0/email-report',
'notification-icon-star.png' => '1.168.0/email-report',
// invitation-email assets (1.172.0).
'invitation-envelope-graphic.png' => '1.172.0/invitation-email',
);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is there some more documentation somewhere on how this works or how these versions should be updated? I'm surprised we're not using n.e.x.t here. How do developers know how to add new assets here?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I had already discussed a refactor of this to move away from linking assets to version numbers and to simplify the asset loading by using a key-based asset map. Lmk what you think of this refactor.

Comment thread includes/Core/Email_Reporting/templates/invitation-email/template.php Outdated
Comment thread includes/Core/Email_Reporting/templates/invitation-email/template.php Outdated
benbowler and others added 4 commits February 4, 2026 12:33
Co-authored-by: Matthew Riley MacPherson <hi@tofumatt.com>
Co-authored-by: Matthew Riley MacPherson <hi@tofumatt.com>
@benbowler

Copy link
Copy Markdown
Collaborator Author

Thanks @tofumatt. I have asked @sigal-teller to review/approve the copy changes, as they will need to be brought back to Figma to prevent being caught in QA later.

benbowler and others added 3 commits February 5, 2026 10:57
Co-authored-by: Matthew Riley MacPherson <hi@tofumatt.com>
…ate.php

Co-authored-by: Matthew Riley MacPherson <hi@tofumatt.com>
@tofumatt tofumatt merged commit 77ee5d0 into develop Feb 11, 2026
26 of 34 checks passed
@tofumatt tofumatt deleted the enhancement/11851-add-invitation-email-template branch February 11, 2026 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants