Merge pull request #6266 from maxrice/fix-6255

Use `note` for creating/updating order with customer note
This commit is contained in:
Mike Jolley 2014-09-16 10:51:37 +01:00
commit d6c1643a12
1 changed files with 3 additions and 3 deletions

View File

@ -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