I added this function in my themes functions.php but it just not working.. any idea what i do wrong?
function woocommerce_thankyou_fun( $order_id )
{
$order = new WC_Order( $order_id );
// $ttotal = $order->get_order_total();
//echo trim( str_replace( '#', '', $order->get_order_number() ) );
//$order_id = absint( $wp->query_vars['order-received'] );
//$order = new WC_Order($GLOBALS['post']->ID);
echo $order;
}
add_shortcode('Woocommerce-Thankyou', 'woocommerce_thankyou_fun');
Use this code to see all datamember of order object.