Home Forums WC Vendors Pro Support Get product thumbnail for ratings

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 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #27187
    Anna
    Member

    Hello, there- this isn’t that important, just something I’d like to add if I can.

    I’m editing the reviews/ratings template for Pro.
    I’ve done a lot of searching and such… and though I found several methods to fetch the image/post data to obtain the product thumbnail, I’m not sure what would be right for the ratings page.
    with the $vf I’m not sure how to do this.

    Could you guide me as to how I would get the thumbnail image for the same product as is being rated? I’m guessing it is something like you’ve done for the get_permalink( $vf->product_id ); but instead get_post_thumbnail ???

    So far I have not been able to achieve this.

    #27317
    WC Vendors Support
    Participant

    https://developer.wordpress.org/reference/functions/get_post_thumbnail/ would do the trick! You’d probably want to get the smallest size possible then resize it to fit with css or specify dimensions.

    https://developer.wordpress.org/reference/functions/get_post_thumbnail/ would also do the trick, if you are on the product page.

    $vf->product_id would spit out the post ID for the thumbnail for those two functions.

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