VirtueMart

WooCommerce

Others

Docs

Support

Demo

Blog

About

Forum
Welcome, Guest
Username: Password: Remember me

TOPIC: Need help to display customer order details

Need help to display customer order details 05 Feb 2018 08:17 #1

I am trying to display customer order details as i have implemented all the steps mention in the tutorial https://www.wpblog.com/display-woocommerce-customer-order-details/ but still i am not having the actual output.

I have taken order id as same implemented there but not having a exact output that shown.
$order_id
$order_meta = get_post_meta($order_id);
The administrator has disabled public write access.

Need help to display customer order details Today 13:01 #2

Dear AlexanderBiscajin,
What information do you want to display exactly? The order number assigned by our plugin should be available as
$order->get_order_number()

There is no need to work with the internals of our plugin, but it's much better to use the API defined by WooCommerce (get_order_number() works with our plugin and it should also work with other order number plugins....)

BTW, if you really need to access the order meta data, you should do something like:
$order_id = $order->get_id();
$order_meta = get_post_meta($order_id, ....)

On the other hand, WooCommerce 3.0 added some more functionality to access internal data through the WC_Order object rather than accessing the (internal) order meta manually. This has to be seen in light of future compatibility: Just because certain things are currently stored as post meta does not mean that they will always be stored as post metas. Providing a nice, clean API at the WC_Order level provides an abstraction between accessing the data and how the data is stored internally.

Best regards,
Reinhold
The administrator has disabled public write access.

VM - Shopping cart

 x 

Cart empty

Login Formular