Automattic\WooCommerce\Internal\RestApi\Routes\V4\Settings\Account\Schema

AccountSettingsSchema::get_item_schema_propertiespublicWC 1.0

Return all properties for the item schema.

Method of the class: AccountSettingsSchema{}

No Hooks.

Returns

Array.

Usage

$AccountSettingsSchema = new AccountSettingsSchema();
$AccountSettingsSchema->get_item_schema_properties(): array;

AccountSettingsSchema::get_item_schema_properties() code WC 10.4.3

public function get_item_schema_properties(): array {
	return array(
		'id'          => array(
			'description' => __( 'Unique identifier for the settings group.', 'woocommerce' ),
			'type'        => 'string',
			'context'     => self::VIEW_EDIT_CONTEXT,
			'readonly'    => true,
		),
		'title'       => array(
			'description' => __( 'Settings title.', 'woocommerce' ),
			'type'        => 'string',
			'context'     => self::VIEW_EDIT_CONTEXT,
			'readonly'    => true,
		),
		'description' => array(
			'description' => __( 'Settings description.', 'woocommerce' ),
			'type'        => 'string',
			'context'     => self::VIEW_EDIT_CONTEXT,
			'readonly'    => true,
		),
		'values'      => array(
			'description'          => __( 'Flat key-value mapping of all setting field values.', 'woocommerce' ),
			'type'                 => 'object',
			'context'              => self::VIEW_EDIT_CONTEXT,
			'additionalProperties' => array(
				'description' => __( 'Setting field value.', 'woocommerce' ),
				'type'        => array( 'string', 'number', 'array', 'boolean' ),
			),
		),
		'groups'      => array(
			'description'          => __( 'Collection of setting groups.', 'woocommerce' ),
			'type'                 => 'object',
			'context'              => self::VIEW_EDIT_CONTEXT,
			'additionalProperties' => array(
				'type'        => 'object',
				'description' => __( 'Settings group.', 'woocommerce' ),
				'properties'  => array(
					'title'       => array(
						'description' => __( 'Group title.', 'woocommerce' ),
						'type'        => 'string',
						'context'     => self::VIEW_EDIT_CONTEXT,
					),
					'description' => array(
						'description' => __( 'Group description.', 'woocommerce' ),
						'type'        => 'string',
						'context'     => self::VIEW_EDIT_CONTEXT,
					),
					'order'       => array(
						'description' => __( 'Display order for the group.', 'woocommerce' ),
						'type'        => 'integer',
						'context'     => self::VIEW_EDIT_CONTEXT,
						'readonly'    => true,
					),
					'fields'      => array(
						'description' => __( 'Settings fields.', 'woocommerce' ),
						'type'        => 'array',
						'context'     => self::VIEW_EDIT_CONTEXT,
						'items'       => $this->get_field_schema(),
					),
				),
			),
		),
	);
}