Automattic\WooCommerce\Admin\API
MarketingCampaigns::get_item_schema()
Retrieves the item's schema, conforming to JSON Schema.
Метод класса: MarketingCampaigns{}
Хуков нет.
Возвращает
Массив
. Item schema data.
Использование
$MarketingCampaigns = new MarketingCampaigns(); $MarketingCampaigns->get_item_schema();
Код MarketingCampaigns::get_item_schema() MarketingCampaigns::get item schema WC 9.2.3
public function get_item_schema() { $schema = array( '$schema' => 'http://json-schema.org/draft-04/schema#', 'title' => 'marketing_campaign', 'type' => 'object', 'properties' => array( 'id' => array( 'description' => __( 'The unique identifier for the marketing campaign.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view' ), 'readonly' => true, ), 'channel' => array( 'description' => __( 'The unique identifier for the marketing channel that this campaign belongs to.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view' ), 'readonly' => true, ), 'title' => array( 'description' => __( 'Title of the marketing campaign.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view' ), 'readonly' => true, ), 'manage_url' => array( 'description' => __( 'URL to the campaign management page.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view' ), 'readonly' => true, ), 'cost' => array( 'description' => __( 'Cost of the marketing campaign.', 'woocommerce' ), 'context' => array( 'view' ), 'readonly' => true, 'type' => 'object', 'properties' => array( 'value' => array( 'type' => 'string', 'context' => array( 'view' ), 'readonly' => true, ), 'currency' => array( 'type' => 'string', 'context' => array( 'view' ), 'readonly' => true, ), ), ), 'sales' => array( 'description' => __( 'Sales of the marketing campaign.', 'woocommerce' ), 'context' => array( 'view' ), 'readonly' => true, 'type' => 'object', 'properties' => array( 'value' => array( 'type' => 'string', 'context' => array( 'view' ), 'readonly' => true, ), 'currency' => array( 'type' => 'string', 'context' => array( 'view' ), 'readonly' => true, ), ), ), ), ); return $this->add_additional_fields_schema( $schema ); }