As a WooCommerce development freelancer, every day I repeat many
These are regular WooCommerce orders, which extend the abstract
tax (non discounted) $line_total = $item->get_total(); // Line total (discounted) $ line_total_tax ...
global $wp; global $woocommerce; $order_id = 11; $order = new WC_Order( $ order_id ); $total = $order->get_total(); echo $total;.
Try something like this for displaying your order total get_total(); ?>.
order->get_id() can get the correct value, but the $order->get_total() is always zero.
Support » Plugin: WooCommerce PDF Invoices & Packing Slips » Get order total ... get the order total with order->get_total() ); ?> .
You can get the order total etc e.g. $order->get_total();. */.
File name: woocommerce/includes/abstracts/abstract-wc-order.php. Lines: 1 to 3 of 3. public function get_total( $context = 'view' ) { return ...
... the most recent renewal order rather than the WC_Subscription::get_total() value to allow 3rd party code to customise the amounts for each renewal; however, ...