Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › WooCommerce Product Variations Shown › Reply To: WooCommerce Product Variations Shown
Hi!
You were both right and I have found the cause if this problem. There was an error in the query, and the search looked for ever custom post type that matched “product”. Luckily it’s a minor issue, and it only happens in this case, but here is the solution:
1. open up the plugins/ajax-search-pro/includes/search_content.class.php file and go to line 46 to 49 you should see this:
} else {
$words = implode('|', $types);
$post_types = "($wpdb->posts.post_type REGEXP '$words')";
}
2. replace that code with:
} else {
$words = implode('[[:>:]]|[[:<:]]', $types);
$post_types = "($wpdb->posts.post_type REGEXP '[[:<:]]".$words."[[:>:]]')";
}
I just run a few tests on the test server, and it worked fine.
I will upload this fix to codecanyon as soon as possible as well. Thank you for reporting this issue, and sorry for the inconvenience!