Home Forums WC Vendors Pro Support Getting vendor's name in cart page

NOTICE: We've Moved to a Ticket System for Support

As of August 31, 2017 (12am EST) our support forums will be retired (read-only), and we will be moving to a support ticket system.  This will allow us to better organize and answer support requests, and provide a more personalized experience as we assist our customers.

For the time being, we will leave our forums open for reading and learning while we work on creating a more robust Knowledge Base for everyone to use.

If you are a WC Vendors Pro customer please open a support ticket here. 

If you are a WC Vendors user please open a support ticket on the Wordpress.org forums.

The information on this forum is outdated and in most instances no longer relevant. Please be sure to check our documentation for the most up to date information.

https://docs.wcvendors.com/

Thank you to all of our customers!

 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #77327
    Dima
    Participant

    Hi, i’m working on a function which will compere vendors name, if the name exists than some action will be done..
    My question is how can i get the vendor’s name in the cart page (in each product in cart page)
    Thanks,
    Dima.

    #77352
    Anna
    Member

    Hello,
    Do you mean the vendor’s actual first/last name, the vendor username, or the store name?

    $vendor_id = $cart_item[ 'data' ]->post->post_author;
    

    should get you the author (Vendor) of the product in the cart.
    From there, you’d get_user_meta for the username, store name or actual name– I am just not sure which one you need.

    #77415
    Dima
    Participant

    Solved my problem.
    Thanks you so much.

    #77490
    Anna
    Member

    Great! Glad to know .

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘WC Vendors Pro Support’ is closed to new topics and replies.