fix(2meet-data-optimizer-hivepress-addon): map marketplace hot field to hp_price
- hivepress-marketplace stores its filterable, sortable listing price as hp_price; hp_purchase_price never existed (dev34: 588 hp_price rows) - Drop hp_purchase_count: the addon keeps no per-listing sales counter - Remove the stale docblock note about the legacy core registration path Verify: vendor/bin/phpunit --filter test_on_register_fields_registers_hot_hp_price; addon unit 156 OK, integration 57 OK PR: PR-011
This commit is contained in:
@@ -3,16 +3,12 @@
|
||||
* Marketplace adapter — `hivepress-marketplace` (DETECT-ONLY in v3.0.0).
|
||||
*
|
||||
* The marketplace addon turns listings into purchasable items, integrating
|
||||
* with WooCommerce. It adds:
|
||||
* with WooCommerce. Its filterable, sortable listing attribute `price` is
|
||||
* stored as `hp_price` → decimal(10,2), used in price-range filters (HOT).
|
||||
*
|
||||
* hp_purchase_price → decimal(10,2), used in price-range filters (HOT)
|
||||
* hp_purchase_count → counter (WARM zone, low-criticality)
|
||||
*
|
||||
* Note: `hp_purchase_price` is also conditionally registered by the existing
|
||||
* legacy hivepress integration (Sprint 1 left that path) — the dedup in
|
||||
* Schema_Registry is provider+key based, so registering again under the
|
||||
* `hivepress-marketplace` provider is safe and lets `wp wpdo doctor` show
|
||||
* the right ownership.
|
||||
* Its other listing attributes (price tiers / extras / discounts, quantity,
|
||||
* subscription period, …) are not search filters, and it keeps no per-listing
|
||||
* sales counter.
|
||||
*
|
||||
* Detect-only: not installed in dev environment. Schema reserved for the
|
||||
* day the addon ships.
|
||||
@@ -72,18 +68,12 @@ if ( ! class_exists( 'TMDO_HivePress_Marketplace_Adapter' ) ) {
|
||||
array(
|
||||
array(
|
||||
'post_type' => 'hp_listing',
|
||||
'meta_key' => 'hp_purchase_price',
|
||||
'meta_key' => 'hp_price',
|
||||
'zone' => 'hot',
|
||||
'data_type' => 'decimal(10,2) DEFAULT NULL',
|
||||
'column' => 'hp_purchase_price',
|
||||
'column' => 'hp_price',
|
||||
'indexed' => true,
|
||||
),
|
||||
array(
|
||||
'post_type' => 'hp_listing',
|
||||
'meta_key' => 'hp_purchase_count',
|
||||
'zone' => 'warm',
|
||||
'ttl' => null,
|
||||
),
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user