VirtueMart

WooCommerce

Others

Docs

Support

Demo

Blog

About

Ordernumbers for WooCommerce

We are currently unable to provide proper support!

For the last few months we have been very busy working on some huge, very time-consuming and time-sensitive projects, so our support was very limited and we were unable to provide proper support in our forums! We now have a huge backlog of requests from our customers, which we are trying to clear bit by bit. Unfortunately, this takes longer than we anticipated, so our response time is not yet up to par. We are trying our best to improve this situation as soon as possible.

Sorry for the inconvenience and thank you for your understanding!

Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: [SOLVED] Need help to display customer order details

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

  • alexanderbiscajin
  • alexanderbiscajin's Avatar Topic Author
  • Offline
  • Posts: 2
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);

Please Log in or Create an account to join the conversation.

Need help to display customer order details 17 Feb 2018 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

Please Log in or Create an account to join the conversation.

[SOLVED] Need help to display customer order details 25 Feb 2018 19:57 #3

Problem solved.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1