How do I get current user's vendor ID?

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Viewing 2 reply threads
  • Author
    Posts
    • #81095
      Mitchell Gould
      Participant

      For my custom post types, I need to be able to attribute the current user’s vendor ID.

      What is the best way to get the current user’s vendor ID?

      Also, is there a call like is_vendor()?

    • #81691
      WCFM Forum
      Member

      HI,

      Vendors are normal WP users.

      So you may get vendor id using WP default current user function – get_current_user_id()

      You may check logged in user vendor or not using this WCFM function – wcfm_is_vendor()

      You may use this function to check any user whether he is vendor or not, then you have to pass user id in this function – wcfm_is_vendor( $user_id )

      Thank You

    • #144529
      TW
      Participant
      This reply has been marked as private.
Viewing 2 reply threads
  • You must be logged in to reply to this topic.