Automattic\WooCommerce\Admin\API
ProductAttributes::get_item_schema
Get the Attribute's schema, conforming to JSON Schema.
Method of the class: ProductAttributes{}
No Hooks.
Returns
Array.
Usage
$ProductAttributes = new ProductAttributes(); $ProductAttributes->get_item_schema();
ProductAttributes::get_item_schema() ProductAttributes::get item schema code WC 10.6.2
public function get_item_schema() {
$schema = parent::get_item_schema();
// Custom attributes substitute slugs for numeric IDs.
$schema['properties']['id']['type'] = array( 'integer', 'string' );
return $schema;
}