Automattic\WooCommerce\Admin\API\Reports\Orders\Stats
DataStore::get_net_total
Get the net amount from an order without shipping, tax, or refunds.
Method of the class: DataStore{}
No Hooks.
Returns
float.
Usage
$result = DataStore::get_net_total( $order );
- $order(WC_Order|WC_Order_Refund) (required)
- WC_Order or WC_Order_Refund object.
DataStore::get_net_total() DataStore::get net total code WC 11.3.0
protected static function get_net_total( $order ) {
$net_total = floatval( $order->get_total() ) - floatval( $order->get_total_tax() ) - floatval( $order->get_shipping_total() );
return (float) $net_total;
}