Automattic\WooCommerce\Admin\API
ProductAttributes::get_item_schema()
Get the Attribute's schema, conforming to JSON Schema.
Method of the class: ProductAttributes{}
No Hooks.
Return
Array
.
Usage
$ProductAttributes = new ProductAttributes(); $ProductAttributes->get_item_schema();
ProductAttributes::get_item_schema() ProductAttributes::get item schema code WC 9.7.1
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; }