'context' => [ 'view', 'edit' ], ], 'date_created' => [ 'description' => __( "The date the image was created, in the site's timezone.", 'dokan-lite' ), 'type' => 'date-time', 'context' => [ 'view', 'edit' ], 'readonly' => true, ], 'date_created_gmt' => [ 'description' => __( 'The date the image was created, as GMT.', 'dokan-lite' ), 'type' => 'date-time', 'context' => [ 'view', 'edit' ], 'readonly' => true, ], 'date_modified' => [ 'description' => __( "The date the image was last modified, in the site's timezone.", 'dokan-lite' ), 'type' => 'date-time', 'context' => [ 'view', 'edit' ], 'readonly' => true, ], 'date_modified_gmt' => [ 'description' => __( 'The date the image was last modified, as GMT.', 'dokan-lite' ), 'type' => 'date-time', 'context' => [ 'view', 'edit' ], 'readonly' => true, ], 'src' => [ 'description' => __( 'Image URL.', 'dokan-lite' ), 'type' => 'string', 'format' => 'uri', 'context' => [ 'view', 'edit' ], ], 'name' => [ 'description' => __( 'Image name.', 'dokan-lite' ), 'type' => 'string', 'context' => [ 'view', 'edit' ], ], 'alt' => [ 'description' => __( 'Image alternative text.', 'dokan-lite' ), 'type' => 'string', 'context' => [ 'view', 'edit' ], ], 'position' => [ 'description' => __( 'Image position. 0 means that the image is featured.', 'dokan-lite' ), 'type' => 'integer', 'context' => [ 'view', 'edit' ], ], ], ], ], 'attributes' => [ 'description' => __( 'List of attributes.', 'dokan-lite' ), 'type' => 'array', 'context' => [ 'view', 'edit' ], 'items' => [ 'type' => 'object', 'properties' => [ 'id' => [ 'description' => __( 'Attribute ID.', 'dokan-lite' ), 'type' => 'integer', 'context' => [ 'view', 'edit' ], ], 'name' => [ 'description' => __( 'Attribute name.', 'dokan-lite' ), 'type' => 'string', 'context' => [ 'view', 'edit' ], ], 'position' => [ 'description' => __( 'Attribute position.', 'dokan-lite' ), 'type' => 'integer', 'context' => [ 'view', 'edit' ], ], 'visible' => [ 'description' => __( "Define if the attribute is visible on the \"Additional information\" tab in the product's page.", 'dokan-lite' ), 'type' => 'boolean', 'default' => false, 'context' => [ 'view', 'edit' ], ], 'variation' => [ 'description' => __( 'Define if the attribute can be used as variation.', 'dokan-lite' ), 'type' => 'boolean', 'default' => false, 'context' => [ 'view', 'edit' ], ], 'options' => [ 'description' => __( 'List of available term names of the attribute.', 'dokan-lite' ), 'type' => 'array', 'context' => [ 'view', 'edit' ], 'items' => [ 'type' => 'string', ], ], ], ], ], 'default_attributes' => [ 'description' => __( 'Defaults variation attributes.', 'dokan-lite' ), 'type' => 'array', 'context' => [ 'view', 'edit' ], 'items' => [ 'type' => 'object', 'properties' => [ 'id' => [ 'description' => __( 'Attribute ID.', 'dokan-lite' ), 'type' => 'integer', 'context' => [ 'view', 'edit' ], ], 'name' => [ 'description' => __( 'Attribute name.', 'dokan-lite' ), 'type' => 'string', 'context' => [ 'view', 'edit' ], ], 'option' => [ 'description' => __( 'Selected attribute term name.', 'dokan-lite' ), 'type' => 'string', 'context' => [ 'view', 'edit' ], ], ], ], ], 'variations' => [ 'description' => __( 'List of variations IDs.', 'dokan-lite' ), 'type' => 'array', 'context' => [ 'view', 'edit' ], 'items' => [ 'type' => 'integer', ], 'readonly' => true, ], 'grouped_products' => [ 'description' => __( 'List of grouped products ID.', 'dokan-lite' ), 'type' => 'array', 'items' => [ 'type' => 'integer', ], 'context' => [ 'view', 'edit' ], ], 'menu_order' => [ 'description' => __( 'Menu order, used to custom sort products.', 'dokan-lite' ), 'type' => 'integer', 'context' => [ 'view', 'edit' ], ], 'meta_data' => [ 'description' => __( 'Meta data.', 'dokan-lite' ), 'type' => 'array', 'context' => [ 'view', 'edit' ], 'items' => [ 'type' => 'object', 'properties' => [ 'id' => [ 'description' => __( 'Meta ID.', 'dokan-lite' ), 'type' => 'integer', 'context' => [ 'view', 'edit' ], 'readonly' => true, ], 'key' => [ 'description' => __( 'Meta key.', 'dokan-lite' ), 'type' => 'string', 'context' => [ 'view', 'edit' ], ], 'value' => [ 'description' => __( 'Meta value.', 'dokan-lite' ), 'type' => 'mixed', 'context' => [ 'view', 'edit' ], ], ], ], ], ], ]; return $this->add_additional_fields_schema( $schema ); } }