I've added additional fields to products table. How do I extend the search filters? I can see this hook
fn_set_hook('get_products_pre', $params, $items_per_page, $lang_code);
But not sure how to add on the params.
And add on the SQL statement to:
fn_set_hook('additional_fields_in_search', $params, $fields, $sortings, $condition, $join, $sorting, $group_by, $tmp, $piece, $having);
Your question is not quite clear. Please clarify it with more details
I've added additional columns to products table namely Col1, Col2 and so on. I'd like to add search filter to the REST API call for e.g.:
How do I extend the search filter and add new condition to the SQL?
Please use the get_products_before_select hook in this case. You can extend joins and conditions in this hook.