How would I check if a logged in user has bought a specific product and if yes, to hide that product? Basically we'd like to limit a specific product to be purchased only once by each user.
I saw a function for checking in the API docs http://docs.woothemes.com/wc-apidocs/function-woocommerce_customer_bought_product.html But with my limited knowledge in PHP, I'm not sure how to create a function for what I need.
Or is there an existing plugin that does this? I've tried searching and I didn't find anything.
I'd appreciate the help, thanks! :)