Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › How to showWCFM vendor store in search ?
This topic contains 3 replies, has 2 voices, and was last updated by Ernest Marcinko 1 year, 1 month ago.
- AuthorPosts
- February 9, 2022 at 7:03 pm #36623
Thanks for recently helping me to show dokan plugin vendor store in search result. I have switched to WCFM and it use different way to vendor image. I cant see any Custom field containing the image option for users. Can you provide me any custom code to show the vendor image? Thanks
Here’s the ss https://ibb.co/b6Lqjk1
-
This topic was modified 1 year, 1 month ago by
rifatspir96.
February 10, 2022 at 1:58 pm #36632Hi,
For that I will need to know how that image is stored, and how to access it. Does that plugin has any documentation or API for retrieving the images?
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
February 11, 2022 at 2:55 pm #36684yes here is the plugin url and api guide
https://wordpress.org/plugins/wc-frontend-manager/
https://wclovers.github.io/wcfm-rest-api/#introduction
If you need i will give access to my site
February 11, 2022 at 4:34 pm #36692Fantastic, I have found this from their support forums, which I think has a solution for us.
Try this:
Best,add_filter( 'asp_results', 'asp_get_custom_wcfm_vendor_image', 10, 1 ); function asp_get_custom_wcfm_vendor_image( $results ) { foreach ($results as $k=>&$r) { if ( $r->content_type == 'user' ) { $store = wcfmmp_get_store( $r->id); $img = $store->get_avatar(); if ( !is_wp_error($img) && !empty($img) ) $r->image = $img; } } return $results; }
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
-
This topic was modified 1 year, 1 month ago by
- AuthorPosts
You must be logged in to reply to this topic.