If you update to the latest version, 4.9.7 (it was released earlier today), then you don't even need that. On the Advanced Options -> Exclude results panel you can select the category to include posts from: https://i.imgur.com/9tM0Wf8.png

If you even don't want to include items which have no categories/terms, then on the Frontend-search settings -> Advanced panel turn off the Show posts/CPM with empty taxonomy terms? option: https://i.imgur.com/KDFcVrK.png

Best,Ernest MarcinkoIf you like my products, don't forget to rate them on codecanyon :)