Fix global AI enabled option migration#586
Conversation
|
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #586 +/- ##
=============================================
+ Coverage 72.24% 73.20% +0.96%
- Complexity 1162 1529 +367
=============================================
Files 68 77 +9
Lines 5609 6878 +1269
=============================================
+ Hits 4052 5035 +983
- Misses 1557 1843 +286
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Fixed - Ensure global AI enabled options are migrated properly Co-authored-by: ekamran <ekamran@git.wordpress.org> Co-authored-by: dkotter <dkotter@git.wordpress.org>
What?
Fixes migration of the global AI enabled setting from older AI Experiments installs.
Why?
Older versions saved the global toggle as
ai_experiments_enabled.The existing upgrade routine intended to migrate old experiment settings, but the global option used the wrong names. As a result, after upgrading from AI Experiments 0.5.0 to the current AI plugin, the global Enable AI setting could appear disabled even though it had been enabled before the upgrade.
How?
ai_experiments_enabledto the currentwpai_features_enabledoption.wpai_features_enabledif the current option already exists.Testing Instructions
Automated checks run locally:
Manual verification:
Settings > AI Experiments.Settings > AI.Screenshots/Screencast
Before: AI Experiments 0.5.0 has experiments enabled.

After: Current AI settings preserve the global enabled state after upgrade.

Use of AI Tools
AI assistance: Yes
Tool(s): ChatGPT / Codex
Used for: Repository review, reproduction planning, implementation guidance, test updates, and local verification. I reviewed the changes, tested the behavior locally, and take responsibility for the final submission.