0254e40d83
- ADR-003 step 4 (AddOn side): core, requests, bookings, memberships and marketplace adapters no longer register zone=hot fields or contribute hot_* FSM modules; their keys live in TMDO_HivePress_Entity_Groups. Cold/warm registrations are unchanged. - Hot-table doctor probes go with them (trait defaults apply). The hot-clause query rewrite and cron optimizer are now inert and are left for the ADR step-5 removal together with core's hot path. - New NoHotZoneRegistrationTest pins the invariant across all 13 adapters; per-adapter hot assertions removed. - Verify: HP unit 142 / integration 49 green, phpcs clean (WordPress) - PR: PR-037
77 lines
2.0 KiB
PHP
77 lines
2.0 KiB
PHP
<?php
|
|
/**
|
|
* Marketplace adapter — `hivepress-marketplace` (DETECT-ONLY in v3.0.0).
|
|
*
|
|
* The marketplace addon turns listings into purchasable items, integrating
|
|
* with WooCommerce. Its filterable, sortable listing attribute `price` is
|
|
* stored as `hp_price` → decimal(10,2), used in price-range filters. It is
|
|
* flattened by the `hp_listing_core` entity group
|
|
* (TMDO_HivePress_Entity_Groups); the adapter registers no zone fields.
|
|
*
|
|
* 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.
|
|
*
|
|
* @package WP_Data_Optimizer
|
|
* @since 3.0.0
|
|
*/
|
|
|
|
if ( ! defined( 'ABSPATH' ) ) {
|
|
exit;
|
|
}
|
|
|
|
if ( ! class_exists( 'TMDO_HivePress_Marketplace_Adapter' ) ) {
|
|
|
|
/**
|
|
* Marketplace addon adapter (detect-only).
|
|
*/
|
|
final class TMDO_HivePress_Marketplace_Adapter implements TMDO_HivePress_Adapter {
|
|
|
|
use TMDO_HivePress_Adapter_Trait;
|
|
|
|
/**
|
|
* Constructor — bind register hooks via inherited trait.
|
|
*/
|
|
public function __construct() {
|
|
$this->bind_anti_eav_hooks();
|
|
}
|
|
|
|
/** Adapter slug (matches wp.org plugin slug). */
|
|
public function plugin_slug(): string {
|
|
return 'hivepress-marketplace';
|
|
}
|
|
|
|
/** Class probed for addon presence. */
|
|
public function detection_class(): string {
|
|
return 'HivePress\\Marketplace\\Plugin';
|
|
}
|
|
|
|
/** Version constant probed for addon presence. */
|
|
public function detection_const(): string {
|
|
return 'HIVEPRESS_MARKETPLACE_VERSION';
|
|
}
|
|
|
|
/** Minimum addon version supported. */
|
|
public function minimum_addon_version(): string {
|
|
return '1.0.0';
|
|
}
|
|
|
|
/**
|
|
* 8-D self-score.
|
|
*
|
|
* D8 reduced to 0.9 — index assumption is best-effort until addon installs.
|
|
*/
|
|
public function suitability_score(): array {
|
|
return $this->compose_score(
|
|
array(
|
|
'd8_perf' => 0.9,
|
|
)
|
|
);
|
|
}
|
|
}
|
|
|
|
} // end if ( ! class_exists )
|