SyntaxFix
Write A Post
Hire A Developer
Questions
it worked. Just modified it
global $woocommerce, $post; $order = new WC_Order($post->ID); //to escape # from order id $order_id = trim(str_replace('#', '', $order->get_order_number()));