Automattic\WooCommerce\StoreApi\Schemas\V1
ImageAttachmentSchema::get_properties
Product schema properties.
Method of the class: ImageAttachmentSchema{}
No Hooks.
Returns
Array.
Usage
$ImageAttachmentSchema = new ImageAttachmentSchema(); $ImageAttachmentSchema->get_properties();
ImageAttachmentSchema::get_properties() ImageAttachmentSchema::get properties code WC 10.7.0
public function get_properties() {
return [
'id' => [
'description' => __( 'Image ID.', 'woocommerce' ),
'type' => 'integer',
'context' => [ 'view', 'edit', 'embed' ],
],
'src' => [
'description' => __( 'Full size image URL.', 'woocommerce' ),
'type' => 'string',
'format' => 'uri',
'context' => [ 'view', 'edit', 'embed' ],
],
'thumbnail' => [
'description' => __( 'Thumbnail URL.', 'woocommerce' ),
'type' => 'string',
'format' => 'uri',
'context' => [ 'view', 'edit', 'embed' ],
],
'srcset' => [
'description' => __( 'Full size image srcset for responsive images.', 'woocommerce' ),
'type' => 'string',
'context' => [ 'view', 'edit', 'embed' ],
],
'sizes' => [
'description' => __( 'Full size image sizes for responsive images.', 'woocommerce' ),
'type' => 'string',
'context' => [ 'view', 'edit', 'embed' ],
],
'thumbnail_srcset' => [
'description' => __( 'Thumbnail srcset for responsive images.', 'woocommerce' ),
'type' => 'string',
'context' => [ 'view', 'edit', 'embed' ],
],
'thumbnail_sizes' => [
'description' => __( 'Thumbnail sizes for responsive images.', 'woocommerce' ),
'type' => 'string',
'context' => [ 'view', 'edit', 'embed' ],
],
'name' => [
'description' => __( 'Image name.', 'woocommerce' ),
'type' => 'string',
'context' => [ 'view', 'edit', 'embed' ],
],
'alt' => [
'description' => __( 'Image alternative text.', 'woocommerce' ),
'type' => 'string',
'context' => [ 'view', 'edit', 'embed' ],
],
];
}