WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Blocks\StoreApi\Schemas

ImageAttachmentSchema::get_properties() public WC 1.0

Product schema properties.

{} It's a method of the class: ImageAttachmentSchema{}

No Hooks.

Return

Array.

Usage

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

Code of ImageAttachmentSchema::get_properties() WC 5.6.0

public function get_properties() {
	return [
		'id'        => [
			'description' => __( 'Image ID.', 'woocommerce' ),
			'type'        => 'integer',
			'context'     => [ 'view', 'edit' ],
		],
		'src'       => [
			'description' => __( 'Full size image URL.', 'woocommerce' ),
			'type'        => 'string',
			'format'      => 'uri',
			'context'     => [ 'view', 'edit' ],
		],
		'thumbnail' => [
			'description' => __( 'Thumbnail URL.', 'woocommerce' ),
			'type'        => 'string',
			'format'      => 'uri',
			'context'     => [ 'view', 'edit' ],
		],
		'srcset'    => [
			'description' => __( 'Thumbnail srcset for responsive images.', 'woocommerce' ),
			'type'        => 'string',
			'context'     => [ 'view', 'edit' ],
		],
		'sizes'     => [
			'description' => __( 'Thumbnail sizes for responsive images.', 'woocommerce' ),
			'type'        => 'string',
			'context'     => [ 'view', 'edit' ],
		],
		'name'      => [
			'description' => __( 'Image name.', 'woocommerce' ),
			'type'        => 'string',
			'context'     => [ 'view', 'edit' ],
		],
		'alt'       => [
			'description' => __( 'Image alternative text.', 'woocommerce' ),
			'type'        => 'string',
			'context'     => [ 'view', 'edit' ],
		],
	];
}