Automattic\WooCommerce\Internal\Admin\Settings
PaymentsRestController::get_schema_for_get_payment_providers
Get the schema for the GET payment providers request.
Метод класса: PaymentsRestController{}
Хуков нет.
Возвращает
Массив[].
Использование
// private - только в коде основоного (родительского) класса $result = $this->get_schema_for_get_payment_providers(): array;
Код PaymentsRestController::get_schema_for_get_payment_providers() PaymentsRestController::get schema for get payment providers WC 10.5.0
private function get_schema_for_get_payment_providers(): array {
$schema = array(
'$schema' => 'http://json-schema.org/draft-04/schema#',
'title' => 'WooCommerce Settings Payments providers for the given location.',
'type' => 'object',
);
$schema['properties'] = array(
'providers' => array(
'type' => 'array',
'description' => esc_html__( 'The ordered providers list. This includes registered payment gateways, suggestions, and offline payment methods group entry. The individual offline payment methods are separate.', 'woocommerce' ),
'context' => array( 'view', 'edit' ),
'readonly' => true,
'items' => $this->get_schema_for_payment_provider(),
),
'offline_payment_methods' => array(
'type' => 'array',
'description' => esc_html__( 'The ordered offline payment methods providers list.', 'woocommerce' ),
'context' => array( 'view', 'edit' ),
'readonly' => true,
'items' => $this->get_schema_for_payment_provider(),
),
'suggestions' => array(
'type' => 'array',
'description' => esc_html__( 'The list of suggestions, excluding the ones part of the providers list.', 'woocommerce' ),
'context' => array( 'view', 'edit' ),
'readonly' => true,
'items' => $this->get_schema_for_suggestion(),
),
'suggestion_categories' => array(
'type' => 'array',
'description' => esc_html__( 'The suggestion categories.', 'woocommerce' ),
'context' => array( 'view', 'edit' ),
'readonly' => true,
'items' => array(
'type' => 'object',
'description' => esc_html__( 'A suggestion category.', 'woocommerce' ),
'context' => array( 'view', 'edit' ),
'readonly' => true,
'properties' => array(
'id' => array(
'type' => 'string',
'description' => esc_html__( 'The unique identifier for the category.', 'woocommerce' ),
'context' => array( 'view', 'edit' ),
'readonly' => true,
),
'_priority' => array(
'type' => 'integer',
'description' => esc_html__( 'The priority of the category.', 'woocommerce' ),
'context' => array( 'view', 'edit' ),
'readonly' => true,
),
'title' => array(
'type' => 'string',
'description' => esc_html__( 'The title of the category.', 'woocommerce' ),
'context' => array( 'view', 'edit' ),
'readonly' => true,
),
'description' => array(
'type' => 'string',
'description' => esc_html__( 'The description of the category.', 'woocommerce' ),
'context' => array( 'view', 'edit' ),
'readonly' => true,
),
),
),
),
);
return $schema;
}