Reply To: can the search read woocommerce variations?

Home Forums Product Support Forums Ajax Search Pro for WordPress Support can the search read woocommerce variations? Reply To: can the search read woocommerce variations?

Ernest Marcinko
Ernest Marcinko


Thanks for the proper description and details, it helped me a lot.

I was actually able to find a solution. By default this should work if the proper custom field is selected. First, I have fixed your configuration as the product variation custom post type and the attribute custom field was not selected:

This alone should have solved the issue, however there were no results for some reason. I’ve logged in via FTP and did a few tests, which revealed, that the reference number is not actually stored with the backslash character in the database, so instead of “0039/030046” they are stored as “0039030046”. Weird enough, but there is a solution.

I’ve put the following code to the functions.php file in your active theme directory:

This code removes the backslash character before the search phrase is passed. This is the best possible solution I could come up with, and it’s transparent to the user.

Because no plugin files were modified, the solution will work after a plugin update as well.

Ernest Marcinko

If you like my products, don't forget to rate them on codecanyon :)