$order->get_order_total() issue
-
Hi,
I have made a simple plugin using this code:
add_action( 'woocommerce_thankyou', 'rocapress_tracking_dev' ); function rocapress_tracking_dev( $order_id ) { $order = wc_get_order( $order_id ); $total = $order->get_order_total(); echo $total; }
However, this is the message I get on the thankyou.php page:
Fatal error: Call to undefined method WC_Order::get_order_total() in …/wp-content/plugins/my-plugin/my-plugin.php on line 32
How come? And how can I fix it?
I am using version 2.3.8 of WooCommerce.
Sincerely,
Mika
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘$order->get_order_total() issue’ is closed to new replies.