Removed extra get_post() for orders

This commit is contained in:
Claudio Sanches 2016-11-18 16:46:59 -02:00
parent a8a5763b47
commit 7a6bc5f9f5
3 changed files with 4 additions and 10 deletions

View File

@ -110,9 +110,6 @@ class WC_API_Orders extends WC_API_Resource {
return $id; return $id;
$order = wc_get_order( $id ); $order = wc_get_order( $id );
$order_post = get_post( $id );
$order_data = array( $order_data = array(
'id' => $order->get_id(), 'id' => $order->get_id(),
'order_number' => $order->get_order_number(), 'order_number' => $order->get_order_number(),

View File

@ -151,8 +151,6 @@ class WC_API_Orders extends WC_API_Resource {
// Get the decimal precession // Get the decimal precession
$dp = ( isset( $filter['dp'] ) ? intval( $filter['dp'] ) : 2 ); $dp = ( isset( $filter['dp'] ) ? intval( $filter['dp'] ) : 2 );
$order = wc_get_order( $id ); $order = wc_get_order( $id );
$order_post = get_post( $id );
$order_data = array( $order_data = array(
'id' => $order->get_id(), 'id' => $order->get_id(),
'order_number' => $order->get_order_number(), 'order_number' => $order->get_order_number(),

View File

@ -151,7 +151,6 @@ class WC_API_Orders extends WC_API_Resource {
// Get the decimal precession. // Get the decimal precession.
$dp = ( isset( $filter['dp'] ) ? intval( $filter['dp'] ) : 2 ); $dp = ( isset( $filter['dp'] ) ? intval( $filter['dp'] ) : 2 );
$order = wc_get_order( $id ); $order = wc_get_order( $id );
$order_post = get_post( $id );
$expand = array(); $expand = array();
if ( ! empty( $filter['expand'] ) ) { if ( ! empty( $filter['expand'] ) ) {