How to get vendor id from order id?
-
Hi,
I am trying to get the vendor id from an order id.
What I was doing to get it mentioned below.$order = wc_get_order(5537); $product_id = $order['product_id']; $post_obj = get_post( $product_id ); $vendor_id = $post_obj->post_author; echo $vendor_id;
It’s print out 1 not actual vendor id.
How to get actual vendor id?
Thanks
Shamir
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘How to get vendor id from order id?’ is closed to new replies.