Skip to content

Fix: Bug Inconsistency: Standardize post meta key naming with the wpai_ prefix - #867

Merged
dkotter merged 11 commits into
WordPress:developfrom
hbhalodia:fix/issue-866
Aug 12, 2026
Merged

Fix: Bug Inconsistency: Standardize post meta key naming with the wpai_ prefix#867
dkotter merged 11 commits into
WordPress:developfrom
hbhalodia:fix/issue-866

Conversation

@hbhalodia

@hbhalodia hbhalodia commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

What?

Closes #866

Why?

  • PR fixes the inconsistency in meta keys for the post metas.
  • PR also adds the migration/upgrade file to convert from old meta key to new meta key

How?

  • PR renames the meta key from old to new meta key.
  • PR updates the references from old to new meta key.
  • PR adds the upgrade file that supports the migration from old meta to new meta key.

Use of AI Tools

  • Yes, Claude Code.
  • Opus 4.8
  • Used for implementation of the issue based on details added by me on the issue. Implementation was then reviewed and tested locally by me.

Testing Instructions

  • Activate AI plugin.
  • Generate the summary of any post/page.
  • Check the DB for the meta key, it would be new meta key.
  • For migration, Activate the plugin with the version mentioned, the old meta key should be now replaced with new meta key.

Screenshots or screencast

  • None

Changelog Entry

Changed - Updated all meta keys to use the wpai prefix instead of just ai. Note this changes the prefix on ai_generated, ai_generated_summary and ai_note meta so if you are directly using those, update to using the wpai_ names.

Open WordPress Playground Preview

@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.42857% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.84%. Comparing base (4ff447f) to head (f23a744).

Files with missing lines Patch % Lines
includes/Admin/Upgrades/V1_3_0.php 96.07% 2 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop     #867      +/-   ##
=============================================
+ Coverage      75.76%   75.84%   +0.08%     
- Complexity      3013     3021       +8     
=============================================
  Files            131      132       +1     
  Lines          11915    11966      +51     
=============================================
+ Hits            9027     9076      +49     
- Misses          2888     2890       +2     
Flag Coverage Δ
unit 75.84% <96.42%> (+0.08%) ⬆️

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.

@hbhalodia
hbhalodia marked this pull request as ready for review July 14, 2026 11:49
@hbhalodia
hbhalodia requested a review from a team July 14, 2026 11:49
@github-actions

github-actions Bot commented Jul 14, 2026

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>
Co-authored-by: jeffpaul <jeffpaul@git.wordpress.org>

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

@dkotter dkotter added this to the 1.3.0 milestone Jul 14, 2026

@dkotter dkotter 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.

Left a few comments but overall this looks good. I do see there's still references to the old meta keys in some of our documentation so also need another sweep across the entire plugin to ensure all references are updated

Comment thread includes/Admin/Upgrades/V1_3_0.php
Comment thread includes/Admin/Upgrades/V1_3_0.php
Comment thread includes/Admin/Upgrades/V1_3_0.php Outdated
@hbhalodia
hbhalodia requested a review from jeffpaul as a code owner July 16, 2026 05:53
@hbhalodia

Copy link
Copy Markdown
Contributor Author

Left a few comments but overall this looks good. I do see there's still references to the old meta keys in some of our documentation so also need another sweep across the entire plugin to ensure all references are updated

This is now done in commit - 2d53db7

Thanks,

Comment thread includes/Experiments/Editorial_Notes/Editorial_Notes.php
@dkotter

dkotter commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Note that E2E and Plugin Check tests aren't running right know due to WordPress 7.0.4 not being properly tagged on GitHub:

fatal: couldn't find remote ref 7.0.4

I've run those locally and they are all passing so going to merge this in

@dkotter
dkotter merged commit f6c3c0d into WordPress:develop Aug 12, 2026
22 of 25 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.

Bug Inconsistency: Standardize post meta key naming with the wpai_ prefix

2 participants

Sponsor
SponsoredKunjungi sekarang
Promo