WC_REST_Orders_Controller::get_item_schema()
Get the Order's schema, conforming to JSON Schema.
Метод класса: WC_REST_Orders_Controller{}
Хуков нет.
Возвращает
Массив
.
Использование
$WC_REST_Orders_Controller = new WC_REST_Orders_Controller(); $WC_REST_Orders_Controller->get_item_schema();
Код WC_REST_Orders_Controller::get_item_schema() WC REST Orders Controller::get item schema WC 9.2.3
public function get_item_schema() { $schema = parent::get_item_schema(); $schema['properties']['coupon_lines']['items']['properties']['discount']['readonly'] = true; $schema['properties']['manual_update'] = array( 'default' => false, 'description' => __( 'Set the action as manual so that the order note registers as "added by user".', 'woocommerce' ), 'type' => 'boolean', 'context' => array( 'edit' ), ); return $schema; }