PluginProbe
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant / 2.3.2
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant v2.3.2
2.3.2 2.3.1 2.3.0 2.2.8 2.2.7 trunk 1.10.0 1.10.1 1.10.2 1.10.3 1.10.4 1.10.5 1.11.0 1.11.1 1.11.2 1.6 1.7 1.8 1.8.1 1.8.2 1.8.3 1.9.0 1.9.1 1.9.10 1.9.11 All 60 releases
merchant / inc / abilities / module-adapters / interface-merchant-module-abilities.php

interface-merchant-module-abilities.php in Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant 2.3.2, at inc/abilities/module-adapters/interface-merchant-module-abilities.php

66 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Merchant Module Abilities Interface.
4 *
5 * Defines the contract for module-specific campaign handling
6 * and operation discovery in the WP Abilities API layer.
7 *
8 * @package Merchant
9 * @since 2.3.0
10 */
11
12 if ( ! defined( 'ABSPATH' ) ) {
13 exit;
14 }
15
16 /**
17 * Merchant_Module_Abilities_Interface
18 *
19 * Modules can implement this interface to provide richer
20 * campaign summaries, custom field transformations, and
21 * fine-grained operation discovery for the WP Abilities API.
22 *
23 * @since 2.3.0
24 */
25 interface Merchant_Module_Abilities_Interface {
26
27 /**
28 * Get the flexible_content field ID used for campaigns.
29 *
30 * Return null for settings-only modules.
31 *
32 * @return string|null Campaign field ID, or null if not campaign-based.
33 */
34 public function get_campaign_field_id();
35
36 /**
37 * Get the field used as the campaign title/name.
38 *
39 * @return string The campaign title field key.
40 */
41 public function get_campaign_title_field();
42
43 /**
44 * Get a human-readable summary of a campaign's configuration.
45 *
46 * @param array<string, mixed> $campaign_data Raw campaign field values.
47 *
48 * @return array<string, mixed> Key highlights of this campaign.
49 */
50 public function summarize_campaign( $campaign_data );
51
52 /**
53 * Return schema overrides, or null to use fully auto-generated schema.
54 *
55 * @return array<string, mixed>|null Schema overrides.
56 */
57 public function get_schema_overrides();
58
59 /**
60 * Get the list of available operations for this module.
61 *
62 * @return array<int, string> e.g., ['get-settings', 'update-settings', 'list-campaigns', ...]
63 */
64 public function get_available_operations();
65 }
66