Currently, referral codes can not be limited or excluded for particular products or product categories and can be applied for any order in WooCommerce. What you can do instead is set a minimum order value before the referral code can be applied to the order. 

This is functionality that we have on our road map and we'd like to add. If you are interested in this feature, please tell us by using the chat bubble - feedback like yours will help us  prioritize what features we should add next.

Did this answer your question?