Skip to content

Fix: Increase the default http timeout for wp/v2/settings for put and post request - #947

Merged
dkotter merged 4 commits into
WordPress:developfrom
hbhalodia:fix/issue-940
Aug 19, 2026
Merged

dkotter merged 4 commits into
WordPress:developfrom
hbhalodia:fix/issue-940

Conversation

@hbhalodia

@hbhalodia hbhalodia commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

What?

Closes #940

Why?

  • PR resolves the issue where settings save is removing the openAI key while checking the authentication on each save request, which sometimes throws the timeout error.

How?

  • PR adds the support of increased http timeout on filter which only added when the route called is wp/v2/settings.

Use of AI Tools

  • Yes, Claude Code, Opus 5.
  • Used for timeout implemenation and for unit tests to add all scenarios.

Testing Instructions

  1. Add the openAI key in connectors screen.
  2. Go to Settings --> AI.
  3. Quickly update some settings multiple times.
  4. Check for response, it should not remove the openAI key.

Changelog Entry

Fixed - Prevent stored AI provider API keys from being cleared during unrelated /wp/v2/settings saves by extending the HTTP timeout while core revalidates them.

Open WordPress Playground Preview

@hbhalodia
hbhalodia marked this pull request as ready for review August 18, 2026 05:54
@hbhalodia
hbhalodia requested a review from a team August 18, 2026 05:54
@github-actions

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: hbhalodia <hbhalodia@git.wordpress.org>
Co-authored-by: dkotter <dkotter@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@codecov

codecov Bot commented Aug 18, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.42%. Comparing base (788e1a6) to head (58839c5).

Additional details and impacted files
@@              Coverage Diff              @@
##             develop     #947      +/-   ##
=============================================
+ Coverage      74.39%   74.42%   +0.02%     
- Complexity      3110     3116       +6     
=============================================
  Files            132      132              
  Lines          12166    12179      +13     
=============================================
+ Hits            9051     9064      +13     
  Misses          3115     3115              
Flag Coverage Δ
unit 74.42% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@jeffpaul
jeffpaul requested a review from dkotter August 18, 2026 13:45
@jeffpaul jeffpaul added this to the 1.3.0 milestone Aug 18, 2026
Comment thread includes/Settings/Settings_Registration.php Outdated
Comment thread includes/Settings/Settings_Registration.php
@jeffpaul jeffpaul modified the milestones: 1.3.0, 1.4.0 Aug 18, 2026
@hbhalodia
hbhalodia requested a review from dkotter August 19, 2026 05:25
@dkotter
dkotter merged commit 0a35d7a into WordPress:develop Aug 19, 2026
34 checks passed
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.

Introduce new custom endpoint for settings save and by pass core /wp/v2/settings endpoint for saving AI options

3 participants