Hello Shadowq,
I suppose it would take a bit of an effort, but could probably be accomplished. First of all, here is the way to “catch” the autocomplete calls:
if( wp_doing_ajax() && isset( $_REQUEST['awf_front'] ) && isset( $_GET['awf_action'] ) && 'get_search_autocomplete' === $_GET['awf_action'] ) {
// autocomplete-related code here
}
The autocomplete queries use the same WooCommerce string search engine as the rest of the keywords search. You can hook into it using the woocommerce_product_pre_search_products hook to alter the keywords query, or simply parse the WP query using the pre_get_posts or any other convenient hook, which would probably make sense in case you need to filter out some product categories or other taxonomies.
And finally, I assume that you have already seen it and it’s not exactly what you need, but enabling the Apply filters to autocomplete results option will apply all the currently active filters to autocomplete returns. You will find the active filters in the $_GET[‘awf_query’] (requested from inside of the conditional statement that I give above).