Woocommerce – Order info is empty on frontend?

Question

I’m trying to create a page similar to the checkout page with all the customer, billing, and order information. As a last resort, I tried to retrieve the unique order link, but I had trouble with even that.

This is my current code, and the array shows up with empty fields.

<?php
$order = new WC_Order( $order_id );

print_r($order)
?>

Empty array

0
Maria 4 months 0 Answers 17 views 0

Leave an answer