Repository navigation
Fixed admin email retrieval - #3117
girishpanchal30 wants to merge 1 commit into
Conversation
Bundle Size Diff
|
|
Plugin build for 99ddcdb is ready 🛎️!
|
There was a problem hiding this comment.
🟢 Approval recommended
The targeted multisite behavior is implemented consistently and covered by focused tests.
0 open findings
What changed in this PR
Uses each site’s admin email for form notifications in multisite installations.
Changes:
- Replaces network admin email lookups with current-site lookups.
- Adds coverage for notifications, alerts, test emails, and autoresponders.
| File | Description |
|---|---|
inc/server/class-form-server.php |
Uses site admin email for recipients and senders. |
inc/integrations/class-form-email.php |
Displays the site admin email in email content. |
plugins/otter-pro/inc/plugins/class-form-pro-features.php |
Uses site admin as the autoresponder sender. |
tests/test-form-server.php |
Tests site versus network admin behavior. |
tests/test-form-pro-delivery.php |
Tests Pro autoresponder and alert behavior. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
🟢 Approved
Form emails now use the current site's admin email on every path, and the new tests prove the change.
Validation details
- Files reviewed: 5/5 changed files.
- A source search found no remaining
get_site_option( 'admin_email' )read outside tests. - Sandbox: WordPress 7.1.3, PHP 8.3, PHPUnit 9.6.5. The 5 new tests pass on HEAD.
- The same 5 tests fail on the base code. Each one gets
network-admin@example.orginstead ofsite-admin@example.org. - Single sites keep the same behavior, because
get_site_optionfalls back toget_optionthere.
Untested areas
- The multisite PHPUnit suite did not run. The tests use filters to give the site and the network different emails.
🤖 Automated review · run code-review-agent_6acf758fd245a0.10162683.
🤖 Review agent — review posted ✅ on 99ddcdb4 · approved · 0 findings · 5 min
Run code-review-agent_6acf758fd245a0.10162683 · trail
E2E TestsPlaywright Test Status: See serial and parallel matrix jobs Performance ResultsserverResponse: {"q25":410.37,"q50":447.64,"q75":452.52,"cnt":10}, firstPaint: {"q25":1584.93,"q50":1642.24,"q75":2123.3,"cnt":10}, domContentLoaded: {"q25":4282.61,"q50":4300.43,"q75":4328.36,"cnt":10}, loaded: {"q25":4286.36,"q50":4304.23,"q75":4332.57,"cnt":10}, firstContentfulPaint: {"q25":2797.98,"q50":3221.4,"q75":3252.28,"cnt":10}, firstBlock: {"q25":19966.59,"q50":20155.9,"q75":20237.92,"cnt":10}, type: {"q25":34.93,"q50":39.56,"q75":44.74,"cnt":10}, typeWithoutInspector: {"q25":32.47,"q50":36,"q75":40.57,"cnt":10}, typeWithTopToolbar: {"q25":41.97,"q50":48.23,"q75":59.1,"cnt":10}, typeContainer: {"q25":18.73,"q50":20.14,"q75":21.55,"cnt":10}, focus: {"q25":155.99,"q50":166.23,"q75":169.04,"cnt":10}, inserterOpen: {"q25":53.41,"q50":54.53,"q75":57.92,"cnt":10}, inserterSearch: {"q25":33.66,"q50":36.16,"q75":37.07,"cnt":10}, inserterHover: {"q25":5.58,"q50":5.93,"q75":6.12,"cnt":20}, loadPatterns: {"q25":2167.79,"q50":2184.39,"q75":2219.19,"cnt":10}, listViewOpen: {"q25":260.32,"q50":265.96,"q75":275.03,"cnt":10} |
Closes #3102
Summary
Updates the admin email addresses used for form notifications and alerts, ensuring that emails are consistently sent from and to the current site's admin email (
get_option( 'admin_email' )) rather than the network admin email (get_site_option( 'admin_email' )). This change improves compatibility with WordPress multisite setups, where site and network admin emails may differ. The tests have been expanded to verify this behavior, including new coverage for edge cases.Checklist before the final review