Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Compatibility with another plugin › Reply To: Compatibility with another plugin
March 23, 2016 at 3:40 pm
#8160
Okays. In this case, try putting this to the functions.php file in your active theme directory:
add_filter( 'asp_results', 'asp_get_yith_vendor_data', 1, 1 );
function asp_get_yith_vendor_data( $results ) {
foreach ($results as $k=>$v) {
if ( $v->content_type == "term" ) {
if( function_exists( 'YITH_Vendors' ) ){
$vendor_description = $vendor_logo = '';
$vendor = yith_get_vendor( $term_id, 'vendor' );
if( $vendor->is_valid() ){
$vendor_description = $vendor->description;
$vendor_logo = get_avatar( $vendor->get_owner(), get_option( 'yith_vendors_gravatar_image_size', '62' ) );
}
$results[$k]->image = $vendor_logo;
$results[$k]->content = $vendor_description;
}
}
}
return $results;
}
Let’s hope it will work.
Best,Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)