When it comes to WC I generally try to use product attributes instead of ACF fields and then use existing search plugins for searching products.
There are plugins available that will can be used to include custom fields in the WP keyword search.
I usually go a different path when it comes to keyword searching and ACF.
but for creating a search field that specifically searches a single field by keyword, I have not seen anything like this, all I can do is point you in the right direction. Like I said, you need to split the input into words on spaces and punctuation, I would probably try something simple like
$parts = preg_split('/\W/1', $string)
This will split up a string on any non word character. Then you build the query that does a LIKE query on each for each part. It would not be perfect, but it would get the job done.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
© 2022 Advanced Custom Fields.