[API] Fixed create order method

This commit is contained in:
Claudio Sanches 2015-04-16 15:26:54 -03:00
parent 99896f8410
commit 7ab0d01aa2
1 changed files with 2 additions and 2 deletions

View File

@ -374,8 +374,6 @@ class WC_API_Orders extends WC_API_Resource {
public function create_order( $data ) {
global $wpdb;
$data = isset( $data['order'] ) ? $data['order'] : array();
$wpdb->query( 'START TRANSACTION' );
try {
@ -951,6 +949,8 @@ class WC_API_Orders extends WC_API_Resource {
$item_args['totals']['subtotal_tax'] = floatval( $item['subtotal_tax'] );
}
error_log( print_r( $item_args, true ) );
if ( $creating ) {
$item_id = $order->add_product( $product, $item_args['qty'], $item_args );