fix(2meet-data-optimizer): route post entity keys by post_type
- Entity groups can declare post_types; get_field() resolves a post's key against its own type's groups first, then unscoped ones (legacy last-wins lookup kept for callers without a post type) - Hook Bus and the post query router pass the post type, so a listing's hp_rating / hp_status / hp_verified map to hp_listing_core instead of the vendor/request tables; core HP groups declare their post types (schema hashes unchanged) - Behind tmdo_post_scoped_routing: on for sites without post flat rows, off where rows may sit in the wrong table until PR-034 reconciles them (dry-run: dev20–22 off, dev23/24/30/31/40 on) - Verify: EntityRegistryScopeTest (8), PostScopedRoutingTest (4); core unit 630 / integration 443, HP 144/49, WC 10/22 OK - PR: PR-033
This commit is contained in:
@@ -340,7 +340,8 @@ final class TMDO_Post_Fields {
|
||||
'type' => 'decimal',
|
||||
'label' => 'Hourly rate',
|
||||
),
|
||||
)
|
||||
),
|
||||
array( 'post_types' => array( 'hp_listing' ) )
|
||||
);
|
||||
}
|
||||
|
||||
@@ -384,7 +385,8 @@ final class TMDO_Post_Fields {
|
||||
'type' => 'integer',
|
||||
'label' => 'View counter',
|
||||
),
|
||||
)
|
||||
),
|
||||
array( 'post_types' => array( 'hp_request' ) )
|
||||
);
|
||||
}
|
||||
|
||||
@@ -427,7 +429,8 @@ final class TMDO_Post_Fields {
|
||||
'searchable' => true,
|
||||
'label' => 'Average rating',
|
||||
),
|
||||
)
|
||||
),
|
||||
array( 'post_types' => array( 'hp_vendor' ) )
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user