Skip to content

Upd. Settings. On wpms improve warnings appears. - #878

Open
svfcode wants to merge 1 commit into
devfrom
upd-wpms-warnings
Open

Upd. Settings. On wpms improve warnings appears.#878
svfcode wants to merge 1 commit into
devfrom
upd-wpms-warnings

Conversation

@svfcode

@svfcode svfcode commented Sep 4, 2026

Copy link
Copy Markdown
Member

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The new multisite test currently only inspects the first 20 sites, which can allow stale errors on additional sites to go untested.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR updates CleanTalk settings behavior in WordPress Multisite to proactively clear stored plugin error banners (warnings) when the multisite work mode changes and when syncing/react access-key checks run in Mutual Access Key mode.

Changes:

  • Added apbct_settings__clear_errors() helper to clear plugin errors on the current site, and optionally across all blogs on WPMS.
  • Triggered network-wide error clearing when multisite__work_mode changes on the main site.
  • Updated sync/react access key check flows to optionally clear errors across all blogs when work mode is Mutual Access Key (mode 2).
File summaries
File Description
inc/cleantalk-settings.php Adds centralized error-clearing helper and uses it in settings validation + sync to remove stale WPMS warning banners.
inc/apbct-sync-react.php Uses the new helper during React access key check, with WPMS mode-2 network-wide clearing.
tests/StandaloneFunctions/SettingsTest.php Adds tests covering current-site and WPMS-all-blogs error clearing behavior.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread tests/StandaloneFunctions/SettingsTest.php
@codecov

codecov Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 24.13793% with 22 lines in your changes missing coverage. Please review.
✅ Project coverage is 30.00%. Comparing base (f2102e1) to head (345dab0).

Files with missing lines Patch % Lines
inc/cleantalk-settings.php 29.16% 17 Missing ⚠️
inc/apbct-sync-react.php 0.00% 5 Missing ⚠️

❌ Your patch check has failed because the patch coverage (24.13%) is below the target coverage (70.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff              @@
##                dev     #878      +/-   ##
============================================
- Coverage     30.00%   30.00%   -0.01%     
  Complexity     6539     6539              
============================================
  Files           289      289              
  Lines         26259    26286      +27     
============================================
+ Hits           7880     7887       +7     
- Misses        18379    18399      +20     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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