[API] Removed useless _order_number param in POST/PUT orders, closes #9250

This commit is contained in:
Claudio Sanches 2015-10-01 10:14:42 +02:00
parent 1defb3fb4f
commit 0547c01418
2 changed files with 0 additions and 24 deletions

View File

@ -470,12 +470,6 @@ class WC_API_Orders extends WC_API_Resource {
update_post_meta( $order->id, '_order_currency', $data['currency'] );
}
// set order number
if ( isset( $data['order_number'] ) ) {
update_post_meta( $order->id, '_order_number', $data['order_number'] );
}
// set order meta
if ( isset( $data['order_meta'] ) && is_array( $data['order_meta'] ) ) {
$this->set_order_meta( $order->id, $data['order_meta'] );
@ -640,12 +634,6 @@ class WC_API_Orders extends WC_API_Resource {
update_post_meta( $order->id, '_order_currency', $data['currency'] );
}
// set order number
if ( isset( $data['order_number'] ) ) {
update_post_meta( $order->id, '_order_number', $data['order_number'] );
}
// if items have changed, recalculate order totals
if ( $update_totals ) {
$order->calculate_totals();

View File

@ -470,12 +470,6 @@ class WC_API_Orders extends WC_API_Resource {
update_post_meta( $order->id, '_order_currency', $data['currency'] );
}
// set order number
if ( isset( $data['order_number'] ) ) {
update_post_meta( $order->id, '_order_number', $data['order_number'] );
}
// set order meta
if ( isset( $data['order_meta'] ) && is_array( $data['order_meta'] ) ) {
$this->set_order_meta( $order->id, $data['order_meta'] );
@ -640,12 +634,6 @@ class WC_API_Orders extends WC_API_Resource {
update_post_meta( $order->id, '_order_currency', $data['currency'] );
}
// set order number
if ( isset( $data['order_number'] ) ) {
update_post_meta( $order->id, '_order_number', $data['order_number'] );
}
// if items have changed, recalculate order totals
if ( $update_totals ) {
$order->calculate_totals();