Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Sensei Email template not displayed in site editor #7463

Merged
merged 4 commits into from Feb 2, 2024

Conversation

donnapep
Copy link
Collaborator

@donnapep donnapep commented Jan 31, 2024

Resolves #7460.

Proposed Changes

Revert 198145c and add an additional check to return early and not add the email template if we're not in the site editor.

Testing Instructions

  • Go to Appearance > Editor > Templates.
  • Look for Sensei Email in the list of templates.
  • Click to edit the template and ensure you're able to.
  • Go to WP Admin > Posts > Tags.
  • Add a new tag and click on View. The tag should remain empty.
  • You shouldn't see the email template, but an empty tag listing.
  • Go to Sensei LMS > Settings > Emails and ensure you are able to preview and edit emails.

Pre-Merge Checklist

  • PR title and description contain sufficient detail and accurately describe the changes
  • Acceptance criteria is met
  • Decisions are publicly documented
  • Adheres to coding standards (PHP, JavaScript, CSS, HTML)
  • All strings are translatable (without concatenation, handles plurals)
  • Follows our naming conventions (P6rkRX-4oA-p2)
  • Hooks (p6rkRX-1uS-p2) and functions are documented
  • New UIs are responsive and use a mobile-first approach
  • New UIs match the designs
  • Different user privileges (admin, teacher, subscriber) are tested as appropriate
  • Legacy courses (course without blocks) are tested
  • Code is tested on the minimum supported PHP and WordPress versions
  • User interface changes have been tested on the latest versions of Chrome, Firefox and Safari
  • "Needs Documentation" label is added if this change requires updates to documentation
  • Known issues are created as new GitHub issues

Also rename parameters to make them consistent with WP docs
@donnapep donnapep added this to the 4.20.2 milestone Jan 31, 2024
@donnapep donnapep self-assigned this Jan 31, 2024
Copy link

codecov bot commented Feb 1, 2024

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (9f25df0) 51.21% compared to head (85fdd5f) 51.20%.
Report is 1 commits behind head on trunk.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##              trunk    #7463      +/-   ##
============================================
- Coverage     51.21%   51.20%   -0.01%     
- Complexity    11188    11189       +1     
============================================
  Files           614      614              
  Lines         47228    47230       +2     
  Branches        405      405              
============================================
  Hits          24186    24186              
- Misses        22715    22717       +2     
  Partials        327      327              
Files Coverage Δ
...udes/internal/emails/class-email-page-template.php 70.00% <77.77%> (-5.00%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e982589...85fdd5f. Read the comment docs.

@donnapep donnapep marked this pull request as ready for review February 1, 2024 21:00
@donnapep donnapep requested a review from a team February 1, 2024 21:11
Copy link
Contributor

@Imran92 Imran92 left a comment

Choose a reason for hiding this comment

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

Looks good and works as expected :shipit:

@donnapep donnapep merged commit c33312b into trunk Feb 2, 2024
23 of 24 checks passed
@donnapep donnapep deleted the fix/no-email-template-in-site-editor branch February 2, 2024 13:22
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.

Sensei Email template not available in site editor
2 participants