Skip to content

Commit

Permalink
Use note for creating/updating order with customer note
Browse files Browse the repository at this point in the history
  • Loading branch information
maxrice committed Sep 15, 2014
1 parent d465945 commit 445aaa7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions includes/api/class-wc-api-orders.php
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ public function create_order( $data ) {
// default order args, note that status is checked for validity in wc_create_order()
$default_order_args = array(
'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
Expand Down Expand Up @@ -478,8 +478,8 @@ public function edit_order( $id, $data ) {
$order_args = array( 'order_id' => $order->id );

// customer note
if ( isset( $data['customer_note'] ) ) {
$order_args['customer_note'] = $data['customer_note'];
if ( isset( $data['note'] ) ) {
$order_args['customer_note'] = $data['note'];
}

// order status
Expand Down

0 comments on commit 445aaa7

Please sign in to comment.