Replies: 0
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 = $item_data['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