-
Notifications
You must be signed in to change notification settings - Fork 296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clear term metadata on Site Kit reset #10061
Comments
Hi @benbowler. Just FYI, this issue isn't specific/dependent on Reader Revenue Manager. I was anticipating the implementation would just include mechanism to clear term metadata within |
@nfmohit I see, that makes sense, IB updated. |
IB ✅ Thanks @benbowler! |
QA Update ⚠
|
Hey @mohitwp, what makes this not very clear for testing is the "Default" field for the custom field you create in the Smart Custom Fields plugin. I suggest the following changes to the QA steps: After step 2. open your database admin tool and check the Instead of step 6., after resetting Site Kit, confirm that all database records in |
QA Update ✅
Recording.1767.mp4Recording.1769.mp4 |
Feature Description
With Reader Revenue Manager Phase 2, Site Kit starts using WordPress term metadata to store term-level configuration. While the Site Kit reset mechanism clears non-persistent SK data in different WP database tables, it doesn't clear term metadata.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation Brief
includes/Core/Util/Reset.php
:delete_term_meta
, modelled on thedelete_post_meta
function, querying and deleting rows fromtermmeta
.all
method to call the newdelete_term_meta
method for site and network mode conditions.Test Coverage
tests/phpunit/integration/Core/Util/ResetTest.php
to confirm all data in the term meta are cleared as expected.QA Brief
Install and activate Smart Custom Fields plugin.
Add a new custom field using plugin's settings page and with following details provided in screenshot. Notice that
name
field starts withgooglesitekit_
, this is important because only settings with this prefix will be removed on reset.Create a category "Test". Add the custom field value in term and save. Ensure that custom field value is saved properly and is being reflected in term edit screen.
Open your database admin tool and check the
wp_termmeta
table and find the key that has been created.Activate the Site Kit plugin with bare minimum modules.
Go to Site Kit > Settings, reset Site Kit.
After resetting Site Kit, confirm that all database records in
wp_termmeta
have been removed with the prefix googlesitekit_.Changelog entry
The text was updated successfully, but these errors were encountered: