This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Reply To: Compatibility with another plugin

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Compatibility with another plugin Reply To: Compatibility with another plugin

#8163
Ernest MarcinkoErnest Marcinko
Keymaster

Yeah, it appears that the code that andrea provided returns the image code instead of the url, I didn’t notice that. Try this modification instead:

[php]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_url( $vendor->get_owner() );
}
$results[$k]->image = $vendor_logo;
$results[$k]->content = $vendor_description;
}
}
}

return $results;
}[/php]