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.
Return
float
.
Usage
$result = DataStore::get_net_total( $order );
- $order(array) (required)
- WC_Order object.
DataStore::get_net_total() DataStore::get net total code WC 8.7.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; }