Blank search results on custom search

OK, So this is somewhat embarrassing and sorry for wasting everyone’s time. When I narrowed down that the issue was just with the products post_type I went and checked what version of Woocommerce was being used and found that it was way out of date. After updating all Woocommerce plugins to the latest versions the product search worked.

One of the first things to do when torubleshooting any issue with Woocommerce or WP in general is typically to ensure all plugins and WP are up to date. I’d like to say that because I did not develop this site and that someone else had been working on it initially that’s why I didn’t think of checking updates but there are really no excuses. I feel like an idiot!