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

Reply To: Ajax Search No Longer Retreiving Data

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Ajax Search No Longer Retreiving Data Reply To: Ajax Search No Longer Retreiving Data

#53441
Ernest MarcinkoErnest Marcinko
Keymaster

Hi,

Thanks for the details!

I have added the following custom code to fetch the images for you:

add_filter('asp_results', function($results){
	foreach ($results as &$r) {
		if ( $r->post_type !== 'product' ) continue;
		$schema = get_post_meta($r->id, 'lb_product_schema', true);
		$data = json_decode($schema, true);
		$r->image = isset($data['image'][0]) ? $data['image'][0] : $r->image;
	}
	return $results;
});

There is however one issue unrelated to the plugin. The images source domain have a same-origin policy, so even though they are linked to be displayed, the source domain is prohibiting to display them from anywhere else.

You may want to look at issue. It’s usually an option somewhere in the image domain CDN or on the apache/ngingx mod_rewrite rules.

The code above should work just fine, however I can’t guarantee anything as this is a customization.