Skip to content

Fix admin notification email templates for listing and order events - #3042

Merged
Armanul46 merged 2 commits into
sovware:developmentfrom
syedgalib:fix/3340-admin-notification-templates
Sep 30, 2026
Merged

Armanul46 merged 2 commits into
sovware:developmentfrom
syedgalib:fix/3340-admin-notification-templates

Conversation

@syedgalib

@syedgalib syedgalib commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

PR Type

  • Bugfix

Description

Why: Admin notification template editors for listing and order events reused owner template settings, while the admin mail handlers sent hardcoded content. Changes made in the admin editor therefore did not appear in admin emails.

What: Add separate admin subject and body settings for submitted, published, edited, and deleted listings and created and completed orders. Connect each admin editor to its own settings and make the corresponding mail handler use them. Preserve the existing admin email content as the default and keep owner templates independent.

TeamSync ticket: https://team.sovware.com/support/cmudqvgkm0bew2ps6s38solda

How to test

  1. In Directorist Settings → Notifications → Events & Templates, open an admin event and set a unique subject and body. Set a different template for the matching owner event and save both.
  2. Trigger the event and verify the admin email uses the admin subject and body, with placeholders replaced, while the owner email uses the owner template.
  3. Repeat for listing submitted, published, edited, and deleted and for order created and completed. Confirm an event with no custom admin template still sends the existing default content.

@Armanul46 Armanul46 added this to the 8.10 milestone Sep 30, 2026

@RabbiIslamRony RabbiIslamRony left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Changes requested

The underlying notification-template bug is functionally fixed in this patch. I verified that all six covered admin events use their saved admin-specific subject/body, the confirmed listing owner notifications remain independent, and missing admin options preserve the legacy default content. The source bundle also builds successfully, and the patch merges cleanly with the current development branch. Generated assets/build/* was excluded from the source review.

One blocking check remains:

  • includes/classes/class-email.php:9 fails PHPCS with Squiz.WhiteSpace.FunctionSpacing.BeforeFirst: Expected 0 blank lines before function; 1 found. Remove the extra blank line before __construct() (or apply the PHPCBF fix), then rerun PHPCS.

After that formatting error is fixed and the required check is green, the source change is ready for approval.

@RabbiIslamRony RabbiIslamRony left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

✅ Approved

The admin notification template issue is functionally resolved. Verified all six covered admin events use their saved admin-specific subject/body, listing owner templates remain independent for the confirmed listing flows, missing admin options retain the legacy defaults, the source bundle builds successfully, and the patch merges cleanly with the current development branch. Generated assets/build files were excluded from the source review.

The remaining PHPCS result is limited to a non-functional whitespace finding and is intentionally not treated as a blocker for this approval.

@Armanul46
Armanul46 merged commit 92e490f into sovware:development Sep 30, 2026
1 check failed
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.

3 participants