-1

I went to check if product belong to current vender to show edit and remove button Is there function as an example : product->get_vendor() enter image description here thx ;)

xXxlazharxXx
  • 433
  • 4
  • 8

1 Answers1

1

You can get vendor like this:

$vendor_id = get_post_field( 'post_author', get_the_id() ); //or $product->get_id()
$vendor = new WP_User($vendor_id);
cryss
  • 400
  • 3
  • 8