Automattic\WooCommerce\Admin\API
AnalyticsImports::get_trigger_schema
Get the schema for the trigger endpoint, conforming to JSON Schema.
Метод класса: AnalyticsImports{}
Хуков нет.
Возвращает
Массив.
Использование
$AnalyticsImports = new AnalyticsImports(); $AnalyticsImports->get_trigger_schema();
Код AnalyticsImports::get_trigger_schema() AnalyticsImports::get trigger schema WC 10.5.2
public function get_trigger_schema() {
$schema = array(
'$schema' => 'https://json-schema.org/draft-04/schema#',
'title' => 'analytics_import_trigger',
'type' => 'object',
'properties' => array(
'success' => array(
'type' => 'boolean',
'description' => __( 'Whether the trigger was successful.', 'woocommerce' ),
'context' => array( 'view' ),
'readonly' => true,
),
'message' => array(
'type' => 'string',
'description' => __( 'Result message.', 'woocommerce' ),
'context' => array( 'view' ),
'readonly' => true,
),
),
);
return $this->add_additional_fields_schema( $schema );
}