I need to check if a customer has purchased a specific digital product in WooCommerce.
The case is this: The customer shall not be able to purchase product "b" if they already have purchased product "a" at an earlier time - product "b" is a part of bigger product in that case "a", do if you own product "a" you have product "b" in it.
If the customer has purchased product "a" earlier, then the purchase button of product "b" is inactive or hidden so they won't be able to purchase.
Thanks.