Removed extra get_post() for orders
This commit is contained in:
parent
a8a5763b47
commit
7a6bc5f9f5
|
@ -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(),
|
||||||
|
|
|
@ -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(),
|
||||||
|
|
|
@ -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'] ) ) {
|
||||||
|
|
Loading…
Reference in New Issue