Get the WordPress User ID by Vendor/Host ID

How can I get the WordPress User ID by Vendor/Host ID? Thank you.

1 Like

Following, need the same.

$author_id = get_post_field( ā€˜post_authorā€™, $vendor_id );

3 Likes

Sorry for the delay. The suggested code snippet seems to be ok, the user ID is stored in the ā€œpost_authorā€ field of the vendor post (vendor is a custom ā€œhp_vendorā€ post type).

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.