add_filter( "wpo_custom_product_search", function($ids,$query_args,$term){
// check if it's product id
$product = wc_get_product($term);
if( $product ) 
  $product_id = $product->get_id();
else // try search by SKU
  $product_id = wc_get_product_id_by_sku($term);
// use default search if we return FALSE
return $product_id ? array($product_id) : false;
},10,3);