Automattic\WooCommerce\Admin\API
ProductAttributes::get_item_schema()
Get the Attribute's schema, conforming to JSON Schema.
Метод класса: ProductAttributes{}
Хуков нет.
Возвращает
Массив
.
Использование
$ProductAttributes = new ProductAttributes(); $ProductAttributes->get_item_schema();
Код ProductAttributes::get_item_schema() ProductAttributes::get item schema WC 8.3.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; }