Merge pull request #6266 from maxrice/fix-6255
Use `note` for creating/updating order with customer note
This commit is contained in:
commit
d6c1643a12
|
@ -349,7 +349,7 @@ class WC_API_Orders extends WC_API_Resource {
|
||||||
// default order args, note that status is checked for validity in wc_create_order()
|
// default order args, note that status is checked for validity in wc_create_order()
|
||||||
$default_order_args = array(
|
$default_order_args = array(
|
||||||
'status' => isset( $data['status'] ) ? $data['status'] : '',
|
'status' => isset( $data['status'] ) ? $data['status'] : '',
|
||||||
'customer_note' => isset( $data['customer_note'] ) ? $data['customer_note'] : null,
|
'customer_note' => isset( $data['note'] ) ? $data['note'] : null,
|
||||||
);
|
);
|
||||||
|
|
||||||
// if creating order for existing customer
|
// if creating order for existing customer
|
||||||
|
@ -478,8 +478,8 @@ class WC_API_Orders extends WC_API_Resource {
|
||||||
$order_args = array( 'order_id' => $order->id );
|
$order_args = array( 'order_id' => $order->id );
|
||||||
|
|
||||||
// customer note
|
// customer note
|
||||||
if ( isset( $data['customer_note'] ) ) {
|
if ( isset( $data['note'] ) ) {
|
||||||
$order_args['customer_note'] = $data['customer_note'];
|
$order_args['customer_note'] = $data['note'];
|
||||||
}
|
}
|
||||||
|
|
||||||
// order status
|
// order status
|
||||||
|
|
Loading…
Reference in New Issue