feat(2meet-data-optimizer): guard orphaned flat-table groups
- On init:1, re-register aeav_only groups whose flat table exists and whose definition is in wpdo_registry_meta but no active plugin registers them, so their data stays readable (routing only, never DDL) - Keys owned by a live group, or with rows in native meta (newer data written while orphaned), are left alone; the native-meta check is cached for a day - Surface restored groups via Site Health (wpdo_orphaned_entity_groups), the admin Doctor tab, and wp wpdo doctor - Verify: EntityRegistryRestoreTest (9), OrphanGroupRestoreTest (7); core unit 622 / integration 439, HP 141/49, WC 10/22 OK; dry-run on dev20–22 restores 16/17/4 groups, keeps hp_taxonomy hp_sort_order/hp_icon on native - PR: PR-018
This commit is contained in:
@@ -71,6 +71,12 @@ class TMDO_Core {
|
||||
if ( class_exists( 'TMDO_Custom_Table_Registry' ) ) {
|
||||
TMDO_Custom_Table_Registry::instance()->fire_registration();
|
||||
}
|
||||
// Every provider has registered by now: re-register groups whose flat
|
||||
// table still holds data but whose plugin is gone, so aeav_only
|
||||
// values keep reading back (routing only — never DDL).
|
||||
if ( class_exists( 'TMDO_Schema_Manager' ) && class_exists( 'TMDO_Entity_Registry' ) ) {
|
||||
TMDO_Schema_Manager::restore_orphaned_groups();
|
||||
}
|
||||
if ( class_exists( 'TMDO_Schema_Manager' ) && class_exists( 'TMDO_Entity_Registry' ) ) {
|
||||
$pending = TMDO_Entity_Registry::get_pending_schemas();
|
||||
if ( ! empty( $pending ) ) {
|
||||
|
||||
Reference in New Issue
Block a user