Automattic\WooCommerce\StoreApi\Schemas\V1

ShopperListSchema::get_propertiespublicWC 1.0

Schema properties.

Method of the class: ShopperListSchema{}

No Hooks.

Returns

Array.

Usage

$ShopperListSchema = new ShopperListSchema();
$ShopperListSchema->get_properties();

ShopperListSchema::get_properties() code WC 10.9.1

public function get_properties() {
	return array(
		'slug'             => array(
			'description' => __( 'Stable slug for the list.', 'woocommerce' ),
			'type'        => 'string',
			'context'     => array( 'view', 'edit' ),
			'readonly'    => true,
		),
		'date_created_gmt' => array(
			'description' => __( 'The date the list was created, as GMT.', 'woocommerce' ),
			'type'        => 'string',
			'format'      => 'date-time',
			'context'     => array( 'view', 'edit' ),
			'readonly'    => true,
		),
		'item_count'       => array(
			'description' => __( 'Number of items currently in the list.', 'woocommerce' ),
			'type'        => 'integer',
			'context'     => array( 'view', 'edit' ),
			'readonly'    => true,
		),
		'items'            => array(
			'description' => __( 'List of saved items.', 'woocommerce' ),
			'type'        => 'array',
			'context'     => array( 'view', 'edit' ),
			'readonly'    => true,
			'items'       => array(
				'type'       => 'object',
				'properties' => $this->force_schema_readonly( $this->item_schema->get_properties() ),
			),
		),
	);
}