To get the total price of a order in woocommerce

  • 0

add_action(‘woocommerce_order_status_completed’, ‘complte_order_process_function’);
function complte_order_process_function($order_id){

$order_user_details = new WC_Order($order_id);
$total_order_price=$order_user_details->get_total();

echo  $total_order_price;

}

add_action(‘woocommerce_order_status_completed’, ‘complte_order_process_function’); function complte_order_process_function($order_id){ $order_user_details = new WC_Order($order_id); $total_order_price=$order_user_details->get_total(); echo  $total_order_price; }

add_action(‘woocommerce_order_status_completed’, ‘complte_order_process_function’); function complte_order_process_function($order_id){ $order_user_details = new WC_Order($order_id); $total_order_price=$order_user_details->get_total(); echo  $total_order_price; }