[REST API] Add "number" property to orders endpoint, closes #11250
This commit is contained in:
parent
cde356b259
commit
c7579c5f0b
|
@ -129,6 +129,7 @@ class WC_REST_Orders_Controller extends WC_REST_Posts_Controller {
|
|||
'parent_id' => $post->post_parent,
|
||||
'status' => $order->get_status(),
|
||||
'order_key' => $order->order_key,
|
||||
'number' => $order->get_order_number(),
|
||||
'currency' => $order->get_order_currency(),
|
||||
'version' => $order->order_version,
|
||||
'prices_include_tax' => $order->prices_include_tax,
|
||||
|
@ -1156,6 +1157,12 @@ class WC_REST_Orders_Controller extends WC_REST_Posts_Controller {
|
|||
'context' => array( 'view', 'edit' ),
|
||||
'readonly' => true,
|
||||
),
|
||||
'number' => array(
|
||||
'description' => __( 'Order number.', 'woocommerce' ),
|
||||
'type' => 'string',
|
||||
'context' => array( 'view', 'edit' ),
|
||||
'readonly' => true,
|
||||
),
|
||||
'currency' => array(
|
||||
'description' => __( 'Currency the order was created with, in ISO format.', 'woocommerce' ),
|
||||
'type' => 'string',
|
||||
|
|
Loading…
Reference in New Issue